Skip to content

Commit

Permalink
Add Validate check to our rule type tests (mindersec#1663)
Browse files Browse the repository at this point in the history
This adds more test coverage for both our rules and the Validate construct.
  • Loading branch information
JAORMX authored Nov 15, 2023
1 parent f8d1322 commit 5f6bb83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/engine/rule_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) {
require.NoError(t, err, "failed to parse rule type %s", path)
require.NotNil(t, rt, "failed to parse rule type %s", path)

require.NoError(t, rt.Validate(), "failed to validate rule type %s", path)

t.Log("creating rule validator")
rval, err := engine.NewRuleValidator(rt)
require.NoError(t, err, "failed to create rule validator for rule type %s", path)
Expand Down

0 comments on commit 5f6bb83

Please sign in to comment.