diff --git a/pkg/analyzer/analyzer_test.go b/pkg/analyzer/analyzer_test.go index 4d30b2f330d..ec33b149ae2 100644 --- a/pkg/analyzer/analyzer_test.go +++ b/pkg/analyzer/analyzer_test.go @@ -51,6 +51,7 @@ func TestSetGetNodeAttribute(t *testing.T) { } } + func TestHighlightAnalysis(t *testing.T) { graphs, err := readTwoSBOM(diffTestFile) if err != nil { @@ -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() @@ -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