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:
yusing
2026-02-24 01:36:35 +08:00
parent 6477c35b15
commit 2a51c2ef52

View File

@@ -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)