commit 1c72f98de336ed4416377bc034c01aa785e38ba4
parent aa943b53de20f9840d12d39d289597e7c46e252d
Author: Sebastian Mancke <s.mancke@tarent.de>
Date: Tue, 14 Nov 2017 21:38:01 +0100
removed test for {user} log, since it is not in caddy release, yet
Diffstat:
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/caddy/handler_test.go b/caddy/handler_test.go
@@ -74,17 +74,22 @@ func Test_ServeHTTP_200(t *testing.T) {
t.Errorf("Expected returned status code to be %d, got %d", 0, status)
}
- // Check that the replacer now is able to substitute the user variable in log lines
- replacer, replacerOk := r.Context().Value(httpserver.ReplacerCtxKey).(httpserver.Replacer)
- if !replacerOk {
- t.Errorf("no replacer associated with request")
-
- } else {
- replacement := replacer.Replace("{user}")
- if replacement != "bob" {
- t.Errorf(`wrong replacement: expected "bob", but got %q`, replacement)
+ /**
+ TODO: This will only work with the caddy master branch or the next caddy release
+
+
+ // Check that the replacer now is able to substitute the user variable in log lines
+ replacer, replacerOk := r.Context().Value(httpserver.ReplacerCtxKey).(httpserver.Replacer)
+ if !replacerOk {
+ t.Errorf("no replacer associated with request")
+
+ } else {
+ replacement := replacer.Replace("{user}")
+ if replacement != "bob" {
+ t.Errorf(`wrong replacement: expected "bob", but got %q`, replacement)
+ }
}
- }
+ */
}
//Tests the login page without being logged as a user (doesn't test that the {user} replacer stays as-is)