Skip to content

Commit

Permalink
tests: fix caddyfile adapt warnings (#6619)
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Al Sahaf <[email protected]>
  • Loading branch information
mohammed90 authored Oct 10, 2024
1 parent d7564d6 commit dd5deca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
root_cn "Internal Root Cert"
intermediate_cn "Internal Intermediate Cert"
}
}
}
}

acme.example.com {
acme_server {
ca internal
sign_with_root
}
}

----------
{
"apps": {
Expand Down
3 changes: 2 additions & 1 deletion caddytest/integration/caddyfile_adapt/heredoc.caddyfiletest
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
example.com {
respond <<EOF
respond <<EOF
<html>
<head><title>Foo</title>
<body>Foo</body>
</html>
EOF 200
}

----------
{
"apps": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
example.com

map {host} {my_placeholder} {magic_number} {
map {host} {my_placeholder} {magic_number} {
# Should output boolean "true" and an integer
example.com true 3
example.com true 3

# Should output a string and null
foo.example.com "string value"
foo.example.com "string value"

# Should output two strings (quoted int)
(.*)\.example.com "${1} subdomain" "5"
(.*)\.example.com "${1} subdomain" "5"

# Should output null and a string (quoted int)
~.*\.net$ - `7`
~.*\.net$ - `7`

# Should output a float and the string "false"
~.*\.xyz$ 123.456 "false"
~.*\.xyz$ 123.456 "false"

# Should output two strings, second being escaped quote
default "unknown domain" \"""
default "unknown domain" \"""
}

vars foo bar
Expand All @@ -27,6 +27,7 @@ vars {
ghi 2.3
jkl "mn op"
}

----------
{
"apps": {
Expand Down

0 comments on commit dd5deca

Please sign in to comment.