Skip to content

Commit

Permalink
fix permission issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ninadingole committed Sep 15, 2024
1 parent cda4c95 commit d8d8ee5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,21 @@ func Test_List(t *testing.T) {
func generateFakeFiles(t *testing.T, dir string) {
t.Helper()

_ = os.Mkdir(dir+"/dummy", 0o600)
_ = os.Mkdir(dir+"/sample", 0o600)
_ = os.Mkdir(dir+"/dummy", os.ModePerm)
_ = os.Mkdir(dir+"/sample", os.ModePerm)

//nolint:dupword
//nolint:dupword, gosec
err := os.WriteFile(dir+"/dummy/dummy_test.go", []byte(`package tests_test
import (
"testing"
)
dummy dummy test
`), 0o600)
`), 0o700)
require.NoError(t, err)

//nolint:gosec
err = os.WriteFile(dir+"/sample/sample_test.go", []byte(`
package tests_test
Expand All @@ -132,7 +133,7 @@ func TestSomething(t *testing.T) {
t.Log("Hello, world!")
}
`), 0o600)
`), os.ModePerm)

require.NoError(t, err)
}
Expand Down

0 comments on commit d8d8ee5

Please sign in to comment.