|
@ -217,10 +217,10 @@ func TestPathREMatcher(t *testing.T) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for key, expectVal := range tc.expectRepl { |
|
|
for key, expectVal := range tc.expectRepl { |
|
|
placeholder := fmt.Sprintf("{http.matchers.path_regexp.%s}", key) |
|
|
placeholder := fmt.Sprintf("{matchers.path_regexp.%s}", key) |
|
|
actualVal := repl.Replace(placeholder, "<empty>") |
|
|
actualVal := repl.Replace(placeholder, "<empty>") |
|
|
if actualVal != expectVal { |
|
|
if actualVal != expectVal { |
|
|
t.Errorf("Test %d [%v]: Expected placeholder {http.matchers.path_regexp.%s} to be '%s' but got '%s'", |
|
|
t.Errorf("Test %d [%v]: Expected placeholder {matchers.path_regexp.%s} to be '%s' but got '%s'", |
|
|
i, tc.match.Pattern, key, expectVal, actualVal) |
|
|
i, tc.match.Pattern, key, expectVal, actualVal) |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
@ -334,10 +334,10 @@ func TestHeaderREMatcher(t *testing.T) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for key, expectVal := range tc.expectRepl { |
|
|
for key, expectVal := range tc.expectRepl { |
|
|
placeholder := fmt.Sprintf("{http.matchers.header_regexp.%s}", key) |
|
|
placeholder := fmt.Sprintf("{matchers.header_regexp.%s}", key) |
|
|
actualVal := repl.Replace(placeholder, "<empty>") |
|
|
actualVal := repl.Replace(placeholder, "<empty>") |
|
|
if actualVal != expectVal { |
|
|
if actualVal != expectVal { |
|
|
t.Errorf("Test %d [%v]: Expected placeholder {http.matchers.header_regexp.%s} to be '%s' but got '%s'", |
|
|
t.Errorf("Test %d [%v]: Expected placeholder {matchers.header_regexp.%s} to be '%s' but got '%s'", |
|
|
i, tc.match, key, expectVal, actualVal) |
|
|
i, tc.match, key, expectVal, actualVal) |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|