diff options
Diffstat (limited to 'internal/gitaly')
12 files changed, 18 insertions, 18 deletions
diff --git a/internal/gitaly/service/commit/count_commits_test.go b/internal/gitaly/service/commit/count_commits_test.go index a69e0700b..8b23acfc6 100644 --- a/internal/gitaly/service/commit/count_commits_test.go +++ b/internal/gitaly/service/commit/count_commits_test.go @@ -16,7 +16,7 @@ import ( func TestSuccessfulCountCommitsRequest(t *testing.T) { cfg, repo1, _, client := setupCommitServiceWithRepo(t, true) - repo2, repo2Path, cleanupFn := gittest.InitRepoWithWorktreeAtStorage(t, cfg.Storages[0]) + repo2, repo2Path, cleanupFn := gittest.InitRepoWithWorktreeAtStorage(t, cfg, cfg.Storages[0]) t.Cleanup(cleanupFn) committerName := "Scrooge McDuck" diff --git a/internal/gitaly/service/commit/count_diverging_commits_test.go b/internal/gitaly/service/commit/count_diverging_commits_test.go index 96ab6c959..89a2b87fc 100644 --- a/internal/gitaly/service/commit/count_diverging_commits_test.go +++ b/internal/gitaly/service/commit/count_diverging_commits_test.go @@ -26,7 +26,7 @@ func createRepoWithDivergentBranches(t *testing.T, cfg config.Cfg, leftCommits, f h */ - repo, worktreePath, cleanupFn := gittest.InitRepoWithWorktreeAtStorage(t, cfg.Storages[0]) + repo, worktreePath, cleanupFn := gittest.InitRepoWithWorktreeAtStorage(t, cfg, cfg.Storages[0]) committerName := "Scrooge McDuck" committerEmail := "scrooge@mcduck.com" diff --git a/internal/gitaly/service/commit/list_files_test.go b/internal/gitaly/service/commit/list_files_test.go index bcfe2fdf2..38eba7e25 100644 --- a/internal/gitaly/service/commit/list_files_test.go +++ b/internal/gitaly/service/commit/list_files_test.go @@ -135,7 +135,7 @@ func TestListFiles_success(t *testing.T) { func TestListFiles_unbornBranch(t *testing.T) { cfg, _, _, client := setupCommitServiceWithRepo(t, true) - repo, _, _ := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repo, _, _ := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) tests := []struct { desc string diff --git a/internal/gitaly/service/operations/commit_files_test.go b/internal/gitaly/service/operations/commit_files_test.go index c769d7460..27c06e124 100644 --- a/internal/gitaly/service/operations/commit_files_test.go +++ b/internal/gitaly/service/operations/commit_files_test.go @@ -46,7 +46,7 @@ func TestUserCommitFiles(t *testing.T) { // repository there on every test run. This allows us to use deterministic // paths in the tests. - startRepo, startRepoPath, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + startRepo, startRepoPath, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) t.Cleanup(cleanup) pathToStorage := strings.TrimSuffix(startRepoPath, startRepo.RelativePath) @@ -941,7 +941,7 @@ func TestUserCommitFilesStableCommitID(t *testing.T) { ctx, cfg, _, _, client := setupOperationsService(t, ctx) - repoProto, repoPath, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repoProto, repoPath, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanup() repo := localrepo.New(git.NewExecCommandFactory(cfg), repoProto, cfg) @@ -1000,7 +1000,7 @@ func TestSuccessfulUserCommitFilesRequest(t *testing.T) { ctx, cfg, repo, repoPath, client := setupOperationsService(t, ctx) - newRepo, newRepoPath, newRepoCleanupFn := gittest.InitBareRepoAt(t, cfg.Storages[0]) + newRepo, newRepoPath, newRepoCleanupFn := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer newRepoCleanupFn() filePath := "héllo/wörld" @@ -1254,7 +1254,7 @@ func testSuccessfulUserCommitFilesRemoteRepositoryRequest(setHeader func(header repo := localrepo.New(gitCmdFactory, repoProto, cfg) - newRepoProto, _, newRepoCleanupFn := gittest.InitBareRepoAt(t, cfg.Storages[0]) + newRepoProto, _, newRepoCleanupFn := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer newRepoCleanupFn() newRepo := localrepo.New(gitCmdFactory, newRepoProto, cfg) @@ -1291,7 +1291,7 @@ func TestSuccessfulUserCommitFilesRequestWithSpecialCharactersInSignature(t *tes ctx, cfg, _, _, client := setupOperationsService(t, ctx) - repoProto, _, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repoProto, _, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanup() repo := localrepo.New(git.NewExecCommandFactory(cfg), repoProto, cfg) diff --git a/internal/gitaly/service/operations/revert_test.go b/internal/gitaly/service/operations/revert_test.go index 84266ce0f..1f1458b27 100644 --- a/internal/gitaly/service/operations/revert_test.go +++ b/internal/gitaly/service/operations/revert_test.go @@ -246,7 +246,7 @@ func testServerUserRevertSuccessfulIntoNewRepo(t *testing.T, ctx context.Context masterHeadCommit, err := startRepo.ReadCommit(ctx, "master") require.NoError(t, err) - repoProto, _, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repoProto, _, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanup() repo := localrepo.New(gitCmdFactory, repoProto, cfg) diff --git a/internal/gitaly/service/operations/submodules_test.go b/internal/gitaly/service/operations/submodules_test.go index 8142f2183..706245a04 100644 --- a/internal/gitaly/service/operations/submodules_test.go +++ b/internal/gitaly/service/operations/submodules_test.go @@ -370,7 +370,7 @@ func testFailedUserUpdateSubmoduleRequestDueToRepositoryEmpty(t *testing.T, cfg func testFailedUserUpdateSubmoduleRequestDueToRepositoryEmptyFeatured(t *testing.T, ctx context.Context, cfg config.Cfg, rubySrv *rubyserver.Server) { ctx, _, _, _, client := setupOperationsServiceWithRuby(t, ctx, cfg, rubySrv) - repo, _, cleanup := gittest.InitRepoWithWorktreeAtStorage(t, cfg.Storages[0]) + repo, _, cleanup := gittest.InitRepoWithWorktreeAtStorage(t, cfg, cfg.Storages[0]) t.Cleanup(cleanup) request := &gitalypb.UserUpdateSubmoduleRequest{ diff --git a/internal/gitaly/service/remote/find_remote_root_ref_test.go b/internal/gitaly/service/remote/find_remote_root_ref_test.go index c30fccb53..e9bd8aec2 100644 --- a/internal/gitaly/service/remote/find_remote_root_ref_test.go +++ b/internal/gitaly/service/remote/find_remote_root_ref_test.go @@ -58,7 +58,7 @@ func TestFindRemoteRootRefWithUnbornRemoteHead(t *testing.T) { // We're creating an empty repository. Empty repositories do have a HEAD set up, but they // point to an unborn branch because the default branch hasn't yet been created. - _, clientRepoPath, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + _, clientRepoPath, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanup() testhelper.MustRunCommand(t, nil, "git", "-C", remoteRepoPath, "remote", "add", "foo", "file://"+clientRepoPath) diff --git a/internal/gitaly/service/remote/update_remote_mirror_test.go b/internal/gitaly/service/remote/update_remote_mirror_test.go index 9056e11c3..be277ba4d 100644 --- a/internal/gitaly/service/remote/update_remote_mirror_test.go +++ b/internal/gitaly/service/remote/update_remote_mirror_test.go @@ -350,10 +350,10 @@ func testUpdateRemoteMirrorFeatured(t *testing.T, ctx context.Context, cfg confi }, } { t.Run(tc.desc, func(t *testing.T) { - _, mirrorRepoPath, cleanMirrorRepo := gittest.InitBareRepoAt(t, cfg.Storages[0]) + _, mirrorRepoPath, cleanMirrorRepo := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanMirrorRepo() - sourceRepoPb, sourceRepoPath, cleanSourceRepo := gittest.InitBareRepoAt(t, cfg.Storages[0]) + sourceRepoPb, sourceRepoPath, cleanSourceRepo := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanSourceRepo() // configure the mirror repository as a remote in the source diff --git a/internal/gitaly/service/repository/calculate_checksum_test.go b/internal/gitaly/service/repository/calculate_checksum_test.go index e4d445e9c..f5a49a320 100644 --- a/internal/gitaly/service/repository/calculate_checksum_test.go +++ b/internal/gitaly/service/repository/calculate_checksum_test.go @@ -67,7 +67,7 @@ func TestRefWhitelist(t *testing.T) { func TestEmptyRepositoryCalculateChecksum(t *testing.T) { cfg, client := setupRepositoryServiceWithoutRepo(t) - repo, _, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repo, _, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) t.Cleanup(cleanup) request := &gitalypb.CalculateChecksumRequest{Repository: repo} @@ -82,7 +82,7 @@ func TestEmptyRepositoryCalculateChecksum(t *testing.T) { func TestBrokenRepositoryCalculateChecksum(t *testing.T) { cfg, client := setupRepositoryServiceWithoutRepo(t) - repo, repoPath, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repo, repoPath, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) t.Cleanup(cleanup) // Force an empty HEAD file diff --git a/internal/gitaly/service/repository/optimize_test.go b/internal/gitaly/service/repository/optimize_test.go index 45f5933ca..5c1d22407 100644 --- a/internal/gitaly/service/repository/optimize_test.go +++ b/internal/gitaly/service/repository/optimize_test.go @@ -89,7 +89,7 @@ func TestOptimizeRepository(t *testing.T) { require.Equal(t, getNewestPackfileModtime(t, repoPath), newestsPackfileTime, "there should not have been a new packfile created") - testRepo, testRepoPath, cleanupBare := gittest.InitBareRepoAt(t, cfg.Storages[0]) + testRepo, testRepoPath, cleanupBare := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) t.Cleanup(cleanupBare) blobs := 10 diff --git a/internal/gitaly/service/wiki/find_page_test.go b/internal/gitaly/service/wiki/find_page_test.go index 81f5e1c2a..6780fa3f3 100644 --- a/internal/gitaly/service/wiki/find_page_test.go +++ b/internal/gitaly/service/wiki/find_page_test.go @@ -455,7 +455,7 @@ func TestInvalidWikiFindPageRequestRevision(t *testing.T) { } func testSuccessfulWikiFindPageRequestWithTrailers(t *testing.T, cfg config.Cfg, rubySrv *rubyserver.Server) { - wikiRepo, worktreePath, cleanupFn := gittest.InitRepoWithWorktreeAtStorage(t, cfg.Storages[0]) + wikiRepo, worktreePath, cleanupFn := gittest.InitRepoWithWorktreeAtStorage(t, cfg, cfg.Storages[0]) defer cleanupFn() committerName := "Scróoge McDuck" // Include UTF-8 to ensure encoding is handled diff --git a/internal/gitaly/service/wiki/testhelper_test.go b/internal/gitaly/service/wiki/testhelper_test.go index fce7bfdef..38ba459ba 100644 --- a/internal/gitaly/service/wiki/testhelper_test.go +++ b/internal/gitaly/service/wiki/testhelper_test.go @@ -184,7 +184,7 @@ func updateWikiPage(t *testing.T, client gitalypb.WikiServiceClient, wikiRepo *g } func setupWikiRepo(t *testing.T, cfg config.Cfg) (*gitalypb.Repository, string, func()) { - return gittest.InitBareRepoAt(t, cfg.Storages[0]) + return gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) } func sendBytes(data []byte, chunkSize int, sender func([]byte) error) (int, error) { |