From 719a5e899a6397ef5bbb8a6cc3c65a0c27366af8 Mon Sep 17 00:00:00 2001 From: attiasas Date: Tue, 3 Oct 2023 11:17:04 +0300 Subject: [PATCH] add test --- xray/utils/resultwriter_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xray/utils/resultwriter_test.go b/xray/utils/resultwriter_test.go index 9acc6e28b..a67dfe86c 100644 --- a/xray/utils/resultwriter_test.go +++ b/xray/utils/resultwriter_test.go @@ -171,6 +171,12 @@ func TestGetXrayIssueLocationIfValidExists(t *testing.T) { run: CreateRunWithDummyResults().WithInvocations([]*sarif.Invocation{invocation}), expectedOutput: sarif.NewLocation().WithPhysicalLocation(sarif.NewPhysicalLocation().WithArtifactLocation(sarif.NewArtifactLocation().WithUri("file://" + filepath.Join(testDir, "go.mod")))), }, + { + name: "One descriptor information - no invocation", + tech: coreutils.Go, + run: CreateRunWithDummyResults(), + expectedOutput: sarif.NewLocation().WithPhysicalLocation(sarif.NewPhysicalLocation().WithArtifactLocation(sarif.NewArtifactLocation().WithUri("file://go.mod"))), + }, { name: "Multiple descriptor information", tech: coreutils.Gradle,