diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2022-01-28 16:16:26 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2022-02-02 14:24:22 +0300 |
commit | bf952762c181c43976348ca6528d5c1405d8c5ee (patch) | |
tree | f84333eaf3ea36a57212e5e6747e7d048ba3305b /internal/gitaly/service/repository/fetch_test.go | |
parent | acaad3637701826dacac0c394411f3beb8cfe9c7 (diff) |
Propagate test context to setup helpers in repository package
setupRepositoryService is currently using a TODO context. This commit
propagates the test context down from the tests to the setup helper.
Diffstat (limited to 'internal/gitaly/service/repository/fetch_test.go')
-rw-r--r-- | internal/gitaly/service/repository/fetch_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/gitaly/service/repository/fetch_test.go b/internal/gitaly/service/repository/fetch_test.go index db35fd4b6..360ced75d 100644 --- a/internal/gitaly/service/repository/fetch_test.go +++ b/internal/gitaly/service/repository/fetch_test.go @@ -15,8 +15,9 @@ import ( func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) { t.Parallel() - cfg, sourceRepo, sourcePath, client := setupRepositoryService(t) + ctx := testhelper.Context(t) + cfg, sourceRepo, sourcePath, client := setupRepositoryService(ctx, t) md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) @@ -48,8 +49,9 @@ func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) { func TestFetchSourceBranchSameRepositorySuccess(t *testing.T) { t.Parallel() - cfg, repoProto, repoPath, client := setupRepositoryService(t) + ctx := testhelper.Context(t) + cfg, repoProto, repoPath, client := setupRepositoryService(ctx, t) md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) @@ -78,8 +80,9 @@ func TestFetchSourceBranchSameRepositorySuccess(t *testing.T) { func TestFetchSourceBranchBranchNotFound(t *testing.T) { t.Parallel() - cfg, targetRepo, _, client := setupRepositoryService(t) + ctx := testhelper.Context(t) + cfg, targetRepo, _, client := setupRepositoryService(ctx, t) md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) @@ -126,8 +129,9 @@ func TestFetchSourceBranchBranchNotFound(t *testing.T) { func TestFetchSourceBranchWrongRef(t *testing.T) { t.Parallel() - cfg, targetRepo, _, client := setupRepositoryService(t) + ctx := testhelper.Context(t) + cfg, targetRepo, _, client := setupRepositoryService(ctx, t) md := testcfg.GitalyServersMetadataFromCfg(t, cfg) ctx = testhelper.MergeOutgoingMetadata(ctx, md) |