diff --git a/caddy/setup/rewrite_test.go b/caddy/setup/rewrite_test.go index f3d2e925..c43818b2 100644 --- a/caddy/setup/rewrite_test.go +++ b/caddy/setup/rewrite_test.go @@ -135,7 +135,7 @@ func TestRewriteParse(t *testing.T) { to /to if {path} is a }`, false, []rewrite.Rule{ - &rewrite.ComplexRule{Base: "/", To: "/to", Ifs: []rewrite.If{rewrite.If{"{path}", "is", "a"}}}, + &rewrite.ComplexRule{Base: "/", To: "/to", Ifs: []rewrite.If{rewrite.If{A: "{path}", Operator: "is", B: "a"}}}, }}, } diff --git a/middleware/rewrite/condition_test.go b/middleware/rewrite/condition_test.go index 7db20647..c056f896 100644 --- a/middleware/rewrite/condition_test.go +++ b/middleware/rewrite/condition_test.go @@ -55,7 +55,7 @@ func TestConditions(t *testing.T) { for _, op := range invalidOperators { _, err := NewIf("a", op, "b") if err == nil { - t.Error("Invalid operator %v used, expected error.", op) + t.Errorf("Invalid operator %v used, expected error.", op) } }