Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func AssertFindingListsMatch(t *testing.T, expectedFindings, actualFindings []*o
// Match found, compare the important fields
t.Run(fmt.Sprintf("Comparing finding %s", key), func(t *testing.T) {
assert.Equal(t, expected.GetFindingInfo().GetTitle(), actual.GetFindingInfo().GetTitle(), "Titles should match")
assert.Equal(t, expected.GetFindingInfo().GetDesc(), actual.GetFindingInfo().GetDesc(), "Descriptions should match")

var expectedDS, actualDS ocsffindinginfo.DataSource
// Use require here because if JSON fails, the rest of the checks are invalid.
Expand Down Expand Up @@ -175,6 +176,7 @@ func AssertFindingListsMatch(t *testing.T, expectedFindings, actualFindings []*o

expectedAC := expectedVuln.GetAffectedCode()[0]
actualAC := actualVuln.GetAffectedCode()[0]
assert.Equal(t, expectedAC.GetStartLine(), actualAC.GetStartLine(), "AffectedCode StartLine should match")
assert.Equal(t, expectedAC.GetEndLine(), actualAC.GetEndLine(), "AffectedCode EndLine should match")
})
// Remove from map to track which expected findings were seen
Expand Down
Loading