Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Sep 26, 2023
1 parent 11049cb commit 57e71bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions xray/utils/sarifutils_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package utils

import (
"path"
"path/filepath"
"testing"

"github.com/owenrumney/go-sarif/v2/sarif"
Expand Down Expand Up @@ -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"),
},
}

Expand Down

0 comments on commit 57e71bd

Please sign in to comment.