Skip to content

Commit f9d3314

Browse files
rosenbloomb-sysdigfcracker79
authored andcommitted
fix(tests): use valid list operators in Falco rule exception tests (#711)
Fixed `TestRuleFalcoWithExceptions` to comply with stricter validator enforcement of list field operators. The test was failing with validation error: ``` filter error: '=' operator not supported list filters. Location: rule: TERRAFORM TEST ... - Attach to cluster-admin Role ``` This was caused by recent deployment of stricter validators that enforce the use of compatible operators for list fields. List fields (like `ka.req.binding.subjects`) must use compatible operators (`in`, `exists`, `intersects`) rather than the `=` operator.
1 parent f98007e commit f9d3314

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

sysdig/resource_sysdig_secure_rule_falco_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -443,23 +443,12 @@ resource "sysdig_secure_rule_falco" "falco_rule_with_exceptions" {
443443
comps = ["in", "="]
444444
values = jsonencode([ [["sysdig", "sysdiglabs"], "falco"] ])
445445
}
446-
exceptions {
447-
name = "subjects_equal"
448-
fields = ["ka.req.binding.subjects", "ka.req.binding.role"]
449-
comps = ["=", "="]
450-
values = jsonencode([ ["foo", "bar"] ])
451-
}
452446
exceptions {
453447
name = "only_one_field"
454448
fields = ["ka.req.binding.subjects"]
455449
comps = ["in"]
456450
values = jsonencode([["foo"]])
457451
}
458-
exceptions {
459-
name = "only_one_field_without_comps"
460-
fields = ["ka.req.binding.subjects"]
461-
values = jsonencode([["foo"]])
462-
}
463452
}
464453
`, name)
465454
}

0 commit comments

Comments
 (0)