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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-03-01 12:48:53 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-03-01 12:48:53 +0300
commitbe99c5da09c2847ebd4b32584aba24448a394e8b (patch)
tree0cfd2370b4ee4fb9930b93bb557ff4e8a89857f8 /internal/praefect/replicator_test.go
parent141c3b4899804abd9d2bab26a5fe55497e54e1e8 (diff)
testhelper: Move repository helpers into `gittest`
It's currently not possible to use our git DSL in the testhelper package because of an import cycle between the testhelper and git package. To fix this import cycle, we thus move test-related git helpers into the gittest package. This commit moves the repository helpers. As we're already touching all sites which use these helpers anyway, it also aligns functions to have more consistent naming.
Diffstat (limited to 'internal/praefect/replicator_test.go')
-rw-r--r--internal/praefect/replicator_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/praefect/replicator_test.go b/internal/praefect/replicator_test.go
index 7c1ca703c..79433a660 100644
--- a/internal/praefect/replicator_test.go
+++ b/internal/praefect/replicator_test.go
@@ -107,7 +107,7 @@ func TestReplMgr_ProcessBacklog(t *testing.T) {
srvSocketPath, clean := runFullGitalyServer(t)
defer clean()
- testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t)
+ testRepo, testRepoPath, cleanupFn := gittest.CloneRepo(t)
defer cleanupFn()
conf := config.Config{
@@ -131,7 +131,7 @@ func TestReplMgr_ProcessBacklog(t *testing.T) {
}
// create object pool on the source
- objectPoolPath := testhelper.NewTestObjectPoolName(t)
+ objectPoolPath := gittest.NewObjectPoolName(t)
pool, err := objectpool.NewObjectPool(gitaly_config.Config, gitaly_config.NewLocator(gitaly_config.Config), git.NewExecCommandFactory(gitaly_config.Config), testRepo.GetStorageName(), objectPoolPath)
require.NoError(t, err)
@@ -523,10 +523,10 @@ func TestConfirmReplication(t *testing.T) {
srvSocketPath, clean := runFullGitalyServer(t)
defer clean()
- testRepoA, testRepoAPath, cleanupFn := testhelper.NewTestRepo(t)
+ testRepoA, testRepoAPath, cleanupFn := gittest.CloneRepo(t)
defer cleanupFn()
- testRepoB, _, cleanupFn := testhelper.NewTestRepo(t)
+ testRepoB, _, cleanupFn := gittest.CloneRepo(t)
defer cleanupFn()
connOpts := []grpc.DialOption{
@@ -599,7 +599,7 @@ func TestProcessBacklog_FailedJobs(t *testing.T) {
primarySvr, primarySocket := newReplicationService(t)
defer primarySvr.Stop()
- testRepo, _, cleanupFn := testhelper.NewTestRepo(t)
+ testRepo, _, cleanupFn := gittest.CloneRepo(t)
defer cleanupFn()
primary := config.Node{
@@ -727,7 +727,7 @@ func TestProcessBacklog_Success(t *testing.T) {
primarySvr, primarySocket := newReplicationService(t)
defer primarySvr.Stop()
- testRepo, _, cleanupFn := testhelper.NewTestRepo(t)
+ testRepo, _, cleanupFn := gittest.CloneRepo(t)
defer cleanupFn()
primary := config.Node{