mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-28 03:51:08 +01:00
fix(tests/rules): correct HTTP flow YAML test to use new yaml syntax
This is a test in yaml_test which meant to be testing old YAML syntax instead of new DSL
This commit is contained in:
@@ -250,12 +250,10 @@ func TestHTTPFlow_ResponseRuleWithStatusConditionYAML(t *testing.T) {
|
||||
infoLog := TestRandomFileName()
|
||||
|
||||
err := parseRules(fmt.Sprintf(`
|
||||
status 4xx {
|
||||
log error %s "$req_url returned $status_code"
|
||||
}
|
||||
status 200 {
|
||||
log info %s "$req_url returned $status_code"
|
||||
}
|
||||
- on: status 4xx
|
||||
do: log error %s "$req_url returned $status_code"
|
||||
- on: status 200 {
|
||||
do: log info %s "$req_url returned $status_code"
|
||||
`, errorLog, infoLog), &rules)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user