diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-20 10:52:46 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-26 17:01:20 +0300 |
commit | 0ca7050be1b342394bce52f6ae63887be7954bf0 (patch) | |
tree | 9ca15b648aff7d718e114ec4fbb97167d81538a3 /internal/gitaly/service/repository/fetch_test.go | |
parent | b1befde1514a0b468896bab503802b367d8123a4 (diff) |
testhelper: Move helper to get Gitaly server metadata
Move the helper to get Gitaly server metadata from the Gitaly config
from the testhelper package into the testcfg package. This is required
to break the dependency of the testhelper on `internal/gitaly/config`,
such that this package can start to use the testhelper package.
Diffstat (limited to 'internal/gitaly/service/repository/fetch_test.go')
-rw-r--r-- | internal/gitaly/service/repository/fetch_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/gitaly/service/repository/fetch_test.go b/internal/gitaly/service/repository/fetch_test.go index 5ac9fb2b6..0bcca1290 100644 --- a/internal/gitaly/service/repository/fetch_test.go +++ b/internal/gitaly/service/repository/fetch_test.go @@ -8,6 +8,7 @@ import ( "gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest" "gitlab.com/gitlab-org/gitaly/v14/internal/git/localrepo" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" + "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testcfg" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" "google.golang.org/grpc/codes" ) @@ -19,7 +20,7 @@ func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() - md := testhelper.GitalyServersMetadataFromCfg(t, cfg) + md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) targetRepoProto, _ := gittest.CloneRepo(t, cfg, cfg.Storages[0]) @@ -52,7 +53,7 @@ func TestFetchSourceBranchSameRepositorySuccess(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() - md := testhelper.GitalyServersMetadataFromCfg(t, cfg) + md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) repo := localrepo.NewTestRepo(t, cfg, repoProto) @@ -84,7 +85,7 @@ func TestFetchSourceBranchBranchNotFound(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() - md := testhelper.GitalyServersMetadataFromCfg(t, cfg) + md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) sourceRepo, _ := gittest.CloneRepo(t, cfg, cfg.Storages[0]) @@ -132,7 +133,7 @@ func TestFetchSourceBranchWrongRef(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() - md := testhelper.GitalyServersMetadataFromCfg(t, cfg) + md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) sourceRepo, sourceRepoPath := gittest.CloneRepo(t, cfg, cfg.Storages[0]) |