diff --git a/src/internal/packager/images/pull_test.go b/src/internal/packager/images/pull_test.go index dce04fd963..9dd65acf9d 100644 --- a/src/internal/packager/images/pull_test.go +++ b/src/internal/packager/images/pull_test.go @@ -164,7 +164,8 @@ func TestPullWithInvalidLayerInCache(t *testing.T) { cacheDir := t.TempDir() require.NoError(t, err) layerContent := []byte("this text here is not the valid layer that the image is looking for") - err = os.WriteFile(filepath.Join(cacheDir, "sha256:94c7366c1c3058fbc60a5ea04b6d13199a592a67939a043c41c051c4bfcd117a"), layerContent, 0600) + invalidLayerPath := filepath.Join(cacheDir, "sha256:94c7366c1c3058fbc60a5ea04b6d13199a592a67939a043c41c051c4bfcd117a") + err = os.WriteFile(invalidLayerPath, layerContent, 0777) require.NoError(t, err) pullConfig := PullConfig{ diff --git a/src/internal/packager/images/testdata/invalid-cache-layer/sha256:94c7366c1c3058fbc60a5ea04b6d13199a592a67939a043c41c051c4bfcd117a b/src/internal/packager/images/testdata/invalid-cache-layer/sha256:94c7366c1c3058fbc60a5ea04b6d13199a592a67939a043c41c051c4bfcd117a deleted file mode 100644 index 4648da431d..0000000000 --- a/src/internal/packager/images/testdata/invalid-cache-layer/sha256:94c7366c1c3058fbc60a5ea04b6d13199a592a67939a043c41c051c4bfcd117a +++ /dev/null @@ -1 +0,0 @@ -This file is invalid on purpose to simulate a pull getting messed up and this file needing to be deleted