Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Soham Arora <[email protected]>
  • Loading branch information
arorasoham9 committed May 17, 2024
1 parent 8246425 commit 74f9335
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/analyzer/analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func TestSetGetNodeAttribute(t *testing.T) {
}
}


func TestHighlightAnalysis(t *testing.T) {
graphs, err := readTwoSBOM(diffTestFile)
if err != nil {
Expand Down Expand Up @@ -113,7 +114,7 @@ func TestFindPaths(t *testing.T) {
func readTwoSBOM(filename string) ([]graph.Graph[string, *analyzer.Node], error) {
file, err := os.Open(filename)
if err != nil {
return []graph.Graph[string, *analyzer.Node]{}, fmt.Errorf("Error opening rearranged test file")
return []graph.Graph[string, *analyzer.Node]{}, fmt.Errorf("Error opening test file")

}
defer file.Close()
Expand Down Expand Up @@ -172,6 +173,7 @@ func testEquivalence(fn func(graph.Graph[string, *analyzer.Node], graph.Graph[st
return fmt.Errorf("Reconstructed graph not equal HasSBOMs " + err.Error() + fmt.Sprintf(" Test-%v URI-%v", i, val.Uri))
}
}

graphs, err := readTwoSBOM(rearrangedTestFile)
if err != nil {
return err
Expand Down

0 comments on commit 74f9335

Please sign in to comment.