diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-08-22 14:10:49 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-08-23 08:08:33 +0300 |
commit | d46ef1eaa65d7ddd0b56a17bdbae75120c345c3d (patch) | |
tree | c038f3897a0df22461576e6f96426b6063946d8d | |
parent | e1ef45ca36514b3901a818643d86fe40231513af (diff) |
backup: Remove unneeded skips for SHA256 object format
A subset of functionality for our backups works with the SHA256 object
format, but is skipped regardless of that. Remove any such unneeded
skips.
-rw-r--r-- | internal/backup/backup_test.go | 6 | ||||
-rw-r--r-- | internal/backup/locator_test.go | 13 | ||||
-rw-r--r-- | internal/backup/server_side_test.go | 2 |
3 files changed, 5 insertions, 16 deletions
diff --git a/internal/backup/backup_test.go b/internal/backup/backup_test.go index 4dca937a0..0121f2116 100644 --- a/internal/backup/backup_test.go +++ b/internal/backup/backup_test.go @@ -29,8 +29,6 @@ import ( ) func TestManager_RemoveAllRepositories(t *testing.T) { - gittest.SkipWithSHA256(t) - t.Parallel() cfg := testcfg.Build(t) @@ -61,8 +59,6 @@ func TestManager_RemoveAllRepositories(t *testing.T) { } func TestManager_Create(t *testing.T) { - gittest.SkipWithSHA256(t) - t.Parallel() const backupID = "abc123" @@ -232,8 +228,6 @@ func TestManager_Create(t *testing.T) { } func TestManager_Create_incremental(t *testing.T) { - gittest.SkipWithSHA256(t) - t.Parallel() const backupID = "abc123" diff --git a/internal/backup/locator_test.go b/internal/backup/locator_test.go index 22767f4d4..c9f48fdf1 100644 --- a/internal/backup/locator_test.go +++ b/internal/backup/locator_test.go @@ -17,18 +17,17 @@ import ( ) func TestLegacyLocator(t *testing.T) { - gittest.SkipWithSHA256(t) - t.Parallel() ctx := testhelper.Context(t) cfg := testcfg.Build(t) - repo, _ := gittest.CreateRepository(t, ctx, cfg, gittest.CreateRepositoryConfig{ + repo, repoPath := gittest.CreateRepository(t, ctx, cfg, gittest.CreateRepositoryConfig{ SkipCreationViaService: true, - Seed: gittest.SeedGitLabTest, RelativePath: t.Name(), }) + gittest.WriteCommit(t, cfg, repoPath, gittest.WithBranch(git.DefaultBranch)) + l := LegacyLocator{} t.Run("Begin/Commit Full", func(t *testing.T) { @@ -68,8 +67,6 @@ func TestLegacyLocator(t *testing.T) { } func TestPointerLocator(t *testing.T) { - gittest.SkipWithSHA256(t) - t.Parallel() const backupID = "abc123" @@ -77,11 +74,11 @@ func TestPointerLocator(t *testing.T) { ctx := testhelper.Context(t) cfg := testcfg.Build(t) - repo, _ := gittest.CreateRepository(t, ctx, cfg, gittest.CreateRepositoryConfig{ + repo, repoPath := gittest.CreateRepository(t, ctx, cfg, gittest.CreateRepositoryConfig{ SkipCreationViaService: true, - Seed: gittest.SeedGitLabTest, RelativePath: t.Name(), }) + gittest.WriteCommit(t, cfg, repoPath, gittest.WithBranch(git.DefaultBranch)) t.Run("Begin/Commit full", func(t *testing.T) { t.Parallel() diff --git a/internal/backup/server_side_test.go b/internal/backup/server_side_test.go index 8c49c3046..05f5f9b82 100644 --- a/internal/backup/server_side_test.go +++ b/internal/backup/server_side_test.go @@ -242,8 +242,6 @@ func TestServerSideAdapter_Restore(t *testing.T) { } func TestServerSideAdapter_RemoveAllRepositories(t *testing.T) { - gittest.SkipWithSHA256(t) - t.Parallel() backupRoot := testhelper.TempDir(t) |