From 57e71bdfcd24bbfed7cf5e2665ada00f31b767d6 Mon Sep 17 00:00:00 2001 From: attiasas Date: Tue, 26 Sep 2023 16:27:34 +0300 Subject: [PATCH] fix tests --- xray/utils/sarifutils_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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"), }, }