summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2022-03-22 10:47:21 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2022-03-22 10:47:21 -0600
commit79cbe7bfd06565d0e7ab0717119f78960ed54c08 (patch)
tree4f2b333e5419ad3c3a7c0cc4ea4398afbc61c340 /caddytest
parent55b4c12e0404347828ed691594d1f8ae8228c598 (diff)
httpcaddyfile: Add 'vars' directive
See discussion in #4650
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/map_and_vars_with_raw_types.txt (renamed from caddytest/integration/caddyfile_adapt/map_with_raw_types.txt)19
1 files changed, 19 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/map_with_raw_types.txt b/caddytest/integration/caddyfile_adapt/map_and_vars_with_raw_types.txt
index 54b2b60..af9faf4 100644
--- a/caddytest/integration/caddyfile_adapt/map_with_raw_types.txt
+++ b/caddytest/integration/caddyfile_adapt/map_and_vars_with_raw_types.txt
@@ -19,6 +19,14 @@ map {host} {my_placeholder} {magic_number} {
# Should output two strings, second being escaped quote
default "unknown domain" \"""
}
+
+vars foo bar
+vars {
+ abc true
+ def 1
+ ghi 2.3
+ jkl "mn op"
+}
----------
{
"apps": {
@@ -91,6 +99,17 @@ map {host} {my_placeholder} {magic_number} {
}
],
"source": "{http.request.host}"
+ },
+ {
+ "foo": "bar",
+ "handler": "vars"
+ },
+ {
+ "abc": true,
+ "def": 1,
+ "ghi": 2.3,
+ "handler": "vars",
+ "jkl": "mn op"
}
]
}