Skip to content

Commit

Permalink
fix: revert file perm changes due to failing test and ignore lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed May 30, 2024
1 parent 89bdc55 commit 5649887
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/builder/kaniko/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
"github.com/stretchr/testify/require"
)

const testFilePerms = 0600

func TestCreateTarGz(t *testing.T) {
testDir := t.TempDir()
expectedFiles := map[string]*struct{}{
Expand All @@ -24,10 +22,10 @@ func TestCreateTarGz(t *testing.T) {
}
for file := range expectedFiles {
filePath := filepath.Join(testDir, file)
err := os.MkdirAll(filepath.Dir(filePath), testFilePerms)
err := os.MkdirAll(filepath.Dir(filePath), os.ModePerm) //nolint:gosec
require.NoError(t, err, "Failed to create directory: %s", filepath.Dir(filePath))

err = os.WriteFile(filePath, []byte(file), testFilePerms)
err = os.WriteFile(filePath, []byte(file), os.ModePerm) //nolint:gosec
require.NoError(t, err, "Failed to create file: %s", filePath)
}

Expand Down

0 comments on commit 5649887

Please sign in to comment.