Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Oct 2, 2023
1 parent 998e7ac commit 0b5f0c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xray/utils/resultwriter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,17 @@ func TestFindMaxCVEScore(t *testing.T) {
}

func TestGetXrayIssueLocationIfValidExists(t *testing.T) {
testDir, done := tests.CreateTempDirWithCallbackAndAssert(t)
defer done()
testDir, cleanup := tests.CreateTempDirWithCallbackAndAssert(t)
defer cleanup()
invocation := sarif.NewInvocation().WithWorkingDirectory(sarif.NewSimpleArtifactLocation(testDir))
file, err := os.Create(filepath.Join(testDir, "go.mod"))
assert.NoError(t, err)
assert.NotNil(t, file)
file, err = os.Create(filepath.Join(testDir, "build.gradle.kts"))
defer func() { assert.NoError(t, file.Close()) }()
file2, err := os.Create(filepath.Join(testDir, "build.gradle.kts"))
assert.NoError(t, err)
assert.NotNil(t, file)
assert.NotNil(t, file2)
defer func() { assert.NoError(t, file2.Close()) }()

testCases := []struct {
name string
Expand Down

0 comments on commit 0b5f0c4

Please sign in to comment.