aboutsummaryrefslogtreecommitdiffhomepage
path: root/replacer_test.go
diff options
context:
space:
mode:
authorKévin Dunglas <[email protected]>2022-10-07 11:54:41 +0200
committerGitHub <[email protected]>2022-10-07 05:54:41 -0400
commitb4e28af953aa02fb44f88c155956488b1f473348 (patch)
treeccd6e48fec9d77b9032b4798b2f9cbe40547eab9 /replacer_test.go
parentd46ba2e27fca841c289629fcc5ecf86b7f47d1f9 (diff)
downloadcaddy-b4e28af953aa02fb44f88c155956488b1f473348.tar.gz
caddy-b4e28af953aa02fb44f88c155956488b1f473348.zip
replacer: working directory global placeholder (#5127)
Diffstat (limited to 'replacer_test.go')
-rw-r--r--replacer_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/replacer_test.go b/replacer_test.go
index 09b41c292..41ada7d6d 100644
--- a/replacer_test.go
+++ b/replacer_test.go
@@ -372,6 +372,7 @@ func TestReplacerNew(t *testing.T) {
} else {
// test if default global replacements are added as the first provider
hostname, _ := os.Hostname()
+ wd, _ := os.Getwd()
os.Setenv("CADDY_REPLACER_TEST", "envtest")
defer os.Setenv("CADDY_REPLACER_TEST", "")
@@ -396,6 +397,10 @@ func TestReplacerNew(t *testing.T) {
value: runtime.GOARCH,
},
{
+ variable: "system.wd",
+ value: wd,
+ },
+ {
variable: "env.CADDY_REPLACER_TEST",
value: "envtest",
},