Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cache/walker_test.go')
-rw-r--r--internal/cache/walker_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/cache/walker_test.go b/internal/cache/walker_test.go
index dc4f55f39..39ce3675e 100644
--- a/internal/cache/walker_test.go
+++ b/internal/cache/walker_test.go
@@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/config"
+ "gitlab.com/gitlab-org/gitaly/v15/internal/helper/perm"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testcfg"
)
@@ -38,7 +39,7 @@ func TestDiskCacheObjectWalker(t *testing.T) {
require.NoError(t, err)
path := filepath.Join(cacheDir, tt.name)
- require.NoError(t, os.MkdirAll(filepath.Dir(path), 0o755))
+ require.NoError(t, os.MkdirAll(filepath.Dir(path), perm.SharedDir))
f, err := os.Create(path)
require.NoError(t, err)
@@ -79,7 +80,7 @@ func TestDiskCacheInitialClear(t *testing.T) {
require.NoError(t, err)
canary := filepath.Join(cacheDir, "canary.txt")
- require.NoError(t, os.MkdirAll(filepath.Dir(canary), 0o755))
+ require.NoError(t, os.MkdirAll(filepath.Dir(canary), perm.SharedDir))
require.NoError(t, os.WriteFile(canary, []byte("chirp chirp"), 0o755))
cache := New(cfg, locator, withDisabledWalker())
@@ -115,7 +116,7 @@ func TestCleanWalkEmptyDirs(t *testing.T) {
} {
p := filepath.Join(tmp, tt.path)
if strings.HasSuffix(tt.path, "/") {
- require.NoError(t, os.MkdirAll(p, 0o755))
+ require.NoError(t, os.MkdirAll(p, perm.SharedDir))
} else {
require.NoError(t, os.WriteFile(p, nil, 0o655))
if tt.stale {