diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-06-28 14:26:18 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-06-30 18:31:32 +0300 |
commit | b4f6b3c11b72ea2714868ee941fafa89f5e3960f (patch) | |
tree | 06ffb16178450dd0ed970d8d34b2527ddc9ae735 | |
parent | 07f2710a2ba16fe97d7c0a8a73c5801e13d47e95 (diff) |
repository: Small set of cleanups for FetchRemote tests
This is a small sot of cleanups for FetchRemote tests to fix up test
names and use the correct setup helpers.
-rw-r--r-- | internal/gitaly/service/repository/fetch_remote_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/gitaly/service/repository/fetch_remote_test.go b/internal/gitaly/service/repository/fetch_remote_test.go index 331efdee1..5e2202d73 100644 --- a/internal/gitaly/service/repository/fetch_remote_test.go +++ b/internal/gitaly/service/repository/fetch_remote_test.go @@ -472,7 +472,7 @@ func TestFetchRemote_force(t *testing.T) { } } -func TestFetchRemoteFailure(t *testing.T) { +func TestFetchRemote_inputValidation(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) @@ -617,11 +617,11 @@ func getRefnames(t *testing.T, cfg config.Cfg, repoPath string) []string { return strings.Split(text.ChompBytes(result), "\n") } -func TestFetchRemoteOverHTTP(t *testing.T) { +func TestFetchRemote_http(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) - cfg, _, _, client := setupRepositoryService(ctx, t) + cfg, client := setupRepositoryServiceWithoutRepo(t) testCases := []struct { description string @@ -675,7 +675,7 @@ func TestFetchRemoteOverHTTP(t *testing.T) { } } -func TestFetchRemoteWithPath(t *testing.T) { +func TestFetchRemote_localPath(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) @@ -696,7 +696,7 @@ func TestFetchRemoteWithPath(t *testing.T) { require.Equal(t, getRefnames(t, cfg, sourceRepoPath), getRefnames(t, cfg, mirrorRepoPath)) } -func TestFetchRemoteOverHTTPWithRedirect(t *testing.T) { +func TestFetchRemote_httpWithRedirect(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) @@ -721,7 +721,7 @@ func TestFetchRemoteOverHTTPWithRedirect(t *testing.T) { require.Contains(t, err.Error(), "The requested URL returned error: 303") } -func TestFetchRemoteOverHTTPWithTimeout(t *testing.T) { +func TestFetchRemote_httpWithTimeout(t *testing.T) { t.Parallel() ctx, cancel := context.WithCancel(testhelper.Context(t)) |