Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
fixt: expected vs actual test order
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-santos-code committed Jul 25, 2022
1 parent edae749 commit 2ba56a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/sarif/sarif_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,19 @@ func TestCreateWithResults(t *testing.T) {
*sarifReport.Runs[0].Tool.Driver.InformationURI)

// verify that the rules have been added as per report findings
assert.Equal(t, sarifReport.Runs[0].Tool.Driver.Rules[0].ID, tc.expectedRule)
assert.Equal(t, tc.expectedRule, sarifReport.Runs[0].Tool.Driver.Rules[0].ID)

var ruleNames []string

// check for rules occurrences
for _, sarifRule := range sarifReport.Runs[0].Tool.Driver.Rules {
assert.Equal(t, sarifRule.Properties["tags"], []string{
assert.Equal(t, []string{
"security",
"kubernetes",
"infrastructure",
})
},
sarifRule.Properties["tags"],
)

ruleNames = append(ruleNames, sarifRule.ID)

Expand Down

0 comments on commit 2ba56a8

Please sign in to comment.