diff options
author | James Fargher <jfargher@gitlab.com> | 2023-02-07 23:09:26 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2023-02-08 22:41:28 +0300 |
commit | ebc36ede905f6e16645e33b346bba491fcc12e1f (patch) | |
tree | 059236febc5c597aafc8250c877d5df9ab7b0d0d | |
parent | e9281454fe7557c99e8e1a844a628d9364c27e5f (diff) |
Change inconsistent 655 permission to non-executable 644
655 is executable by group and other but not user. This doesn't
make a lot of sense. So we change it here to non-executable-shared.
-rw-r--r-- | internal/backup/backup_test.go | 2 | ||||
-rw-r--r-- | internal/backup/filesystem_sink_test.go | 2 | ||||
-rw-r--r-- | internal/cache/walker_test.go | 2 | ||||
-rw-r--r-- | internal/git/housekeeping/clean_stale_data_test.go | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/internal/backup/backup_test.go b/internal/backup/backup_test.go index 5416f87f5..f0afa81b0 100644 --- a/internal/backup/backup_test.go +++ b/internal/backup/backup_test.go @@ -533,7 +533,7 @@ func TestResolveSink(t *testing.T) { "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/303724477529-compute%40developer.gserviceaccount.com" -}`), 0o655)) +}`), 0o644)) for _, tc := range []struct { desc string diff --git a/internal/backup/filesystem_sink_test.go b/internal/backup/filesystem_sink_test.go index 7e4025851..3346aab4a 100644 --- a/internal/backup/filesystem_sink_test.go +++ b/internal/backup/filesystem_sink_test.go @@ -79,7 +79,7 @@ func TestFilesystemSink_Write(t *testing.T) { fullPath := filepath.Join(dir, relativePath) require.NoError(t, os.MkdirAll(filepath.Dir(fullPath), perm.SharedDir)) - require.NoError(t, os.WriteFile(fullPath, []byte("initial"), 0o655)) + require.NoError(t, os.WriteFile(fullPath, []byte("initial"), 0o644)) fsSink := NewFilesystemSink(dir) require.NoError(t, fsSink.Write(ctx, relativePath, strings.NewReader("test"))) diff --git a/internal/cache/walker_test.go b/internal/cache/walker_test.go index d587dae74..b4c191ab3 100644 --- a/internal/cache/walker_test.go +++ b/internal/cache/walker_test.go @@ -116,7 +116,7 @@ func TestCleanWalkEmptyDirs(t *testing.T) { if strings.HasSuffix(tt.path, "/") { require.NoError(t, os.MkdirAll(p, perm.SharedDir)) } else { - require.NoError(t, os.WriteFile(p, nil, 0o655)) + require.NoError(t, os.WriteFile(p, nil, 0o644)) if tt.stale { require.NoError(t, os.Chtimes(p, time.Now(), time.Now().Add(-time.Hour))) } diff --git a/internal/git/housekeeping/clean_stale_data_test.go b/internal/git/housekeeping/clean_stale_data_test.go index 573254edb..dd65c03d2 100644 --- a/internal/git/housekeeping/clean_stale_data_test.go +++ b/internal/git/housekeeping/clean_stale_data_test.go @@ -214,7 +214,7 @@ func TestRepositoryManager_CleanStaleData(t *testing.T) { name: "oldtempfile", entries: []entry{ d("objects", perm.PrivateDir, 240*time.Hour, Keep, - f("tmp_a", 0o655, 240*time.Hour, Delete), + f("tmp_a", 0o644, 240*time.Hour, Delete), f("b", 0o700, 24*time.Hour, Keep), ), }, @@ -263,9 +263,9 @@ func TestRepositoryManager_CleanStaleData(t *testing.T) { { name: "files outside of object database", entries: []entry{ - f("tmp_a", 0o655, 240*time.Hour, Keep), + f("tmp_a", 0o644, 240*time.Hour, Keep), d("info", perm.PrivateDir, 240*time.Hour, Keep, - f("tmp_a", 0o655, 240*time.Hour, Keep), + f("tmp_a", 0o644, 240*time.Hour, Keep), ), }, }, |