diff --git a/xray/utils/sarifutils_test.go b/xray/utils/sarifutils_test.go index 62651e60f..33358fe7a 100644 --- a/xray/utils/sarifutils_test.go +++ b/xray/utils/sarifutils_test.go @@ -1,7 +1,7 @@ package utils import ( - "path" + "path/filepath" "testing" "github.com/owenrumney/go-sarif/v2/sarif" @@ -302,17 +302,17 @@ func TestGetFullLocationFileName(t *testing.T) { expectedOutput string }{ { - file: path.Join("root", "someDir", "another", "file"), + file: filepath.Join("root", "someDir", "another", "file"), invocations: []*sarif.Invocation{}, - expectedOutput: path.Join("root", "someDir", "another", "file"), + expectedOutput: filepath.Join("root", "someDir", "another", "file"), }, { - file: path.Join("another", "file"), + file: filepath.Join("another", "file"), invocations: []*sarif.Invocation{ - {WorkingDirectory: sarif.NewSimpleArtifactLocation(path.Join("root", "someDir"))}, - {WorkingDirectory: sarif.NewSimpleArtifactLocation(path.Join("not", "relevant"))}, + {WorkingDirectory: sarif.NewSimpleArtifactLocation(filepath.Join("root", "someDir"))}, + {WorkingDirectory: sarif.NewSimpleArtifactLocation(filepath.Join("not", "relevant"))}, }, - expectedOutput: path.Join("root", "someDir", "another", "file"), + expectedOutput: filepath.Join("root", "someDir", "another", "file"), }, }