diff --git a/internal/gitaly/storage/storagemgr/partition/transaction_manager_default_branch_test.go b/internal/gitaly/storage/storagemgr/partition/transaction_manager_default_branch_test.go index 3f85e34d0374ba6f29bfec224545f959e7ba526d..3e66b82498a1f25ba22788ef1fd1e41f3f02f1b4 100644 --- a/internal/gitaly/storage/storagemgr/partition/transaction_manager_default_branch_test.go +++ b/internal/gitaly/storage/storagemgr/partition/transaction_manager_default_branch_test.go @@ -247,16 +247,6 @@ func generateDefaultBranchTests(t *testing.T, setup testTransactionSetup) []tran }, { MinIndex: 2, - MaxIndex: 2, - References: []git.Reference{ - { - Name: "refs/heads/main", - Target: setup.Commits.First.OID.String(), - }, - }, - }, - { - MinIndex: 3, MaxIndex: 3, References: []git.Reference{ { @@ -264,6 +254,10 @@ func generateDefaultBranchTests(t *testing.T, setup testTransactionSetup) []tran Target: "refs/heads/non-existent", IsSymbolic: true, }, +{ + Name: "refs/heads/main", + Target: setup.Commits.First.OID.String(), + }, }, }, }, @@ -348,16 +342,6 @@ func generateDefaultBranchTests(t *testing.T, setup testTransactionSetup) []tran }, { MinIndex: 3, - MaxIndex: 3, - References: []git.Reference{ - { - Name: "refs/heads/branch2", - Target: setup.ObjectHash.ZeroOID.String(), - }, - }, - }, - { - MinIndex: 4, MaxIndex: 4, References: []git.Reference{ { @@ -365,6 +349,10 @@ func generateDefaultBranchTests(t *testing.T, setup testTransactionSetup) []tran Target: "refs/heads/branch2", IsSymbolic: true, }, + { + Name: "refs/heads/branch2", + Target: setup.ObjectHash.ZeroOID.String(), + }, }, }, }, @@ -450,16 +438,6 @@ func generateDefaultBranchTests(t *testing.T, setup testTransactionSetup) []tran }, { MinIndex: 3, - MaxIndex: 3, - References: []git.Reference{ - { - Name: "refs/heads/main", - Target: setup.Commits.Second.OID.String(), - }, - }, - }, - { - MinIndex: 4, MaxIndex: 4, References: []git.Reference{ { @@ -467,6 +445,10 @@ func generateDefaultBranchTests(t *testing.T, setup testTransactionSetup) []tran Target: "refs/heads/branch2", IsSymbolic: true, }, + { + Name: "refs/heads/main", + Target: setup.Commits.Second.OID.String(), + }, }, }, }, diff --git a/internal/gitaly/storage/storagemgr/partition/transaction_manager_housekeeping_test.go b/internal/gitaly/storage/storagemgr/partition/transaction_manager_housekeeping_test.go index 635d7919a3d0690b2ac5514138e81b5b6271728e..f0e36bd571e21bcb5063f35960618e12387fbf51 100644 --- a/internal/gitaly/storage/storagemgr/partition/transaction_manager_housekeeping_test.go +++ b/internal/gitaly/storage/storagemgr/partition/transaction_manager_housekeeping_test.go @@ -4650,16 +4650,6 @@ func generateHousekeepingRepackingConcurrentTests(t *testing.T, ctx context.Cont }, { MinIndex: 3, - MaxIndex: 3, - References: []git.Reference{ - { - Name: "refs/heads/branch-2", - Target: setup.Commits.Diverging.OID.String(), - }, - }, - }, - { - MinIndex: 4, MaxIndex: 4, References: []git.Reference{ { diff --git a/internal/gitaly/storage/storagemgr/partition/transaction_manager_refs_test.go b/internal/gitaly/storage/storagemgr/partition/transaction_manager_refs_test.go index f3362806e5fcb6d1c74b64be12484bd1aab08342..d46394eed77d835408436da404223382e6fc1f58 100644 --- a/internal/gitaly/storage/storagemgr/partition/transaction_manager_refs_test.go +++ b/internal/gitaly/storage/storagemgr/partition/transaction_manager_refs_test.go @@ -481,19 +481,12 @@ func generateModifyReferencesTests(t *testing.T, setup testTransactionSetup) []t }, { MinIndex: 3, - MaxIndex: 3, + MaxIndex: 4, References: []git.Reference{ { Name: "refs/heads/parent", Target: setup.ObjectHash.ZeroOID.String(), }, - }, - }, - - { - MinIndex: 4, - MaxIndex: 4, - References: []git.Reference{ { Name: "refs/heads/parent/child", Target: setup.Commits.First.OID.String(), @@ -2084,16 +2077,6 @@ func generateModifyReferencesTests(t *testing.T, setup testTransactionSetup) []t }, { MinIndex: 2, - MaxIndex: 2, - References: []git.Reference{ - { - Name: "refs/heads/main", - Target: setup.Commits.First.OID.String(), - }, - }, - }, - { - MinIndex: 3, MaxIndex: 3, References: []git.Reference{ { diff --git a/internal/gitaly/storage/storagemgr/partition/transaction_manager_repo_test.go b/internal/gitaly/storage/storagemgr/partition/transaction_manager_repo_test.go index 0c203538113b8baa62c0c18ebbbeb842d6100ae9..696b8df4f9a1c899c17468f8516cc453eb22c386 100644 --- a/internal/gitaly/storage/storagemgr/partition/transaction_manager_repo_test.go +++ b/internal/gitaly/storage/storagemgr/partition/transaction_manager_repo_test.go @@ -1155,16 +1155,6 @@ func generateDeleteRepositoryTests(t *testing.T, setup testTransactionSetup) []t }, { MinIndex: 2, - MaxIndex: 2, - References: []git.Reference{ - { - Name: "refs/heads/main", - Target: setup.Commits.First.OID.String(), - }, - }, - }, - { - MinIndex: 3, MaxIndex: 3, References: []git.Reference{ { @@ -1172,6 +1162,11 @@ func generateDeleteRepositoryTests(t *testing.T, setup testTransactionSetup) []t Target: "refs/heads/new-head", IsSymbolic: true, }, + { + Name: "refs/heads/main", + Target: setup.Commits.First.OID.String(), + }, + }, }, }, diff --git a/internal/gitaly/storage/storagemgr/partition/transaction_manager_test.go b/internal/gitaly/storage/storagemgr/partition/transaction_manager_test.go index d51dc214166090a8240d674cc0f240b0fd12e503..1e4672b346956bc13ca990c36630ddd58542e7c5 100644 --- a/internal/gitaly/storage/storagemgr/partition/transaction_manager_test.go +++ b/internal/gitaly/storage/storagemgr/partition/transaction_manager_test.go @@ -1608,16 +1608,6 @@ func generateCommonTests(t *testing.T, ctx context.Context, setup testTransactio }, { MinIndex: 2, - MaxIndex: 2, - References: []git.Reference{ - { - Name: "refs/heads/main", - Target: setup.Commits.First.OID.String(), - }, - }, - }, - { - MinIndex: 3, MaxIndex: 3, References: []git.Reference{ { @@ -1625,6 +1615,10 @@ func generateCommonTests(t *testing.T, ctx context.Context, setup testTransactio Target: "refs/heads/new-head", IsSymbolic: true, }, + { + Name: "refs/heads/main", + Target: setup.Commits.First.OID.String(), + }, }, }, }, @@ -1684,16 +1678,6 @@ func generateCommonTests(t *testing.T, ctx context.Context, setup testTransactio }, { MinIndex: 2, - MaxIndex: 2, - References: []git.Reference{ - { - Name: "refs/heads/main", - Target: setup.Commits.First.OID.String(), - }, - }, - }, - { - MinIndex: 3, MaxIndex: 3, References: []git.Reference{ { @@ -1701,6 +1685,10 @@ func generateCommonTests(t *testing.T, ctx context.Context, setup testTransactio Target: "refs/heads/new-head", IsSymbolic: true, }, + { + Name: "refs/heads/main", + Target: setup.Commits.First.OID.String(), + }, }, }, },