-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
This relates to changes introduced in #2396: Go code might be correct, but tests have inverted logic and could be confusing. For example, this snipped in rego_test.go:
t.Run("high severity matches medium expectation", func(t *testing.T) {
matches, err := r.MatchesParameters(context.TODO(), policy,
map[string]string{"severity": "high"},
map[string]string{"severity": "medium"})
require.NoError(t, err)
assert.True(t, matches)
})
It should match false, since the expectation is set to MEDIUM, but a policy evaluation with HIGH will never scan for MEDIUM results, hence it shouldn't match.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels