aboutsummaryrefslogtreecommitdiffhomepage
path: root/replacer_test.go
diff options
context:
space:
mode:
authorMatt Holt <[email protected]>2019-10-28 14:39:37 -0600
committerGitHub <[email protected]>2019-10-28 14:39:37 -0600
commitb00dfd3965f400956c5bb5b388e9d54ef98052e5 (patch)
tree44517743815327f7ef63405b3a13e54f7f20c885 /replacer_test.go
parent6c533558a3db4b30a6b7a81d19ac180fe2000ca2 (diff)
downloadcaddy-b00dfd3965f400956c5bb5b388e9d54ef98052e5.tar.gz
caddy-b00dfd3965f400956c5bb5b388e9d54ef98052e5.zip
v2: Logging! (#2831)
* logging: Initial implementation * logging: More encoder formats, better defaults * logging: Fix repetition bug with FilterEncoder; add more presets * logging: DiscardWriter; delete or no-op logs that discard their output * logging: Add http.handlers.log module; enhance Replacer methods The Replacer interface has new methods to customize how to handle empty or unrecognized placeholders. Closes #2815. * logging: Overhaul HTTP logging, fix bugs, improve filtering, etc. * logging: General cleanup, begin transitioning to using new loggers * Fixes after merge conflict
Diffstat (limited to 'replacer_test.go')
-rw-r--r--replacer_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/replacer_test.go b/replacer_test.go
index a30a75d1c..435582bb6 100644
--- a/replacer_test.go
+++ b/replacer_test.go
@@ -85,7 +85,7 @@ func TestReplacerSet(t *testing.T) {
}
}
-func TestReplacerReplaceAll(t *testing.T) {
+func TestReplacerReplaceKnown(t *testing.T) {
rep := replacer{
providers: []ReplacementFunc{
// split our possible vars to two functions (to test if both functions are called)
@@ -148,7 +148,7 @@ func TestReplacerReplaceAll(t *testing.T) {
expected: "val1 {nope} test-123 ",
},
} {
- actual := rep.ReplaceAll(tc.testInput, "EMPTY")
+ actual := rep.ReplaceKnown(tc.testInput, "EMPTY")
// test if all are replaced as expected
if actual != tc.expected {