diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-16 17:09:08 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-16 17:09:08 +0300 |
commit | 371ec6373c78fd14580d6461af6c047a9d0e858e (patch) | |
tree | 729d658cd5d637f119d296ab6268287e4c21d22f | |
parent | 14926bb024cbfc8a4f916c273b26f1cb04bd540f (diff) | |
parent | ad2503f87e760c76645e56ac05e00654a060c6d6 (diff) |
Merge branch 'pks-ssh-testcfg-fix-semantic-merge-conflict' into 'master'
ssh: Fix semantic merge conflict with testcfg changes
See merge request gitlab-org/gitaly!3261
-rw-r--r-- | internal/gitaly/service/ssh/receive_pack_test.go | 21 | ||||
-rw-r--r-- | internal/gitaly/service/ssh/upload_archive_test.go | 9 | ||||
-rw-r--r-- | internal/gitaly/service/ssh/upload_pack_test.go | 27 |
3 files changed, 19 insertions, 38 deletions
diff --git a/internal/gitaly/service/ssh/receive_pack_test.go b/internal/gitaly/service/ssh/receive_pack_test.go index f9acceffe..f00ad6adc 100644 --- a/internal/gitaly/service/ssh/receive_pack_test.go +++ b/internal/gitaly/service/ssh/receive_pack_test.go @@ -27,8 +27,7 @@ import ( ) func TestFailedReceivePackRequestDueToValidationError(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) serverSocketPath, stop := runSSHServer(t, cfg) defer stop() @@ -81,8 +80,7 @@ func TestFailedReceivePackRequestDueToValidationError(t *testing.T) { } func TestReceivePackPushSuccess(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) cfg.GitlabShell.Dir = "/foo/bar/gitlab-shell" @@ -144,8 +142,7 @@ func TestReceivePackPushSuccess(t *testing.T) { } func TestReceivePackPushSuccessWithGitProtocol(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) testhelper.ConfigureGitalyHooksBin(t, cfg) @@ -171,8 +168,7 @@ func TestReceivePackPushSuccessWithGitProtocol(t *testing.T) { } func TestReceivePackPushFailure(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) serverSocketPath, stop := runSSHServer(t, cfg) defer stop() @@ -185,8 +181,7 @@ func TestReceivePackPushFailure(t *testing.T) { } func TestReceivePackPushHookFailure(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) @@ -210,8 +205,7 @@ func TestReceivePackPushHookFailure(t *testing.T) { } func TestObjectPoolRefAdvertisementHidingSSH(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalyHooksBin(t, cfg) @@ -257,8 +251,7 @@ func TestObjectPoolRefAdvertisementHidingSSH(t *testing.T) { } func TestSSHReceivePackToHooks(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalyHooksBin(t, cfg) testhelper.ConfigureGitalySSHBin(t, cfg) diff --git a/internal/gitaly/service/ssh/upload_archive_test.go b/internal/gitaly/service/ssh/upload_archive_test.go index fb128b0d0..5ff89ae2b 100644 --- a/internal/gitaly/service/ssh/upload_archive_test.go +++ b/internal/gitaly/service/ssh/upload_archive_test.go @@ -18,8 +18,7 @@ import ( ) func TestFailedUploadArchiveRequestDueToTimeout(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) serverSocketPath, stop := runSSHServer(t, cfg, WithArchiveRequestTimeout(100*time.Microsecond)) defer stop() @@ -55,8 +54,7 @@ func TestFailedUploadArchiveRequestDueToTimeout(t *testing.T) { } func TestFailedUploadArchiveRequestDueToValidationError(t *testing.T) { - cfg, cleanup := testcfg.Build(t) - defer cleanup() + cfg := testcfg.Build(t) serverSocketPath, stop := runSSHServer(t, cfg) defer stop() @@ -107,8 +105,7 @@ func TestFailedUploadArchiveRequestDueToValidationError(t *testing.T) { } func TestUploadArchiveSuccess(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) diff --git a/internal/gitaly/service/ssh/upload_pack_test.go b/internal/gitaly/service/ssh/upload_pack_test.go index 1590f83f6..305e8e88f 100644 --- a/internal/gitaly/service/ssh/upload_pack_test.go +++ b/internal/gitaly/service/ssh/upload_pack_test.go @@ -93,8 +93,7 @@ func (cmd cloneCommand) test(t *testing.T, repoPath string, localRepoPath string } func TestFailedUploadPackRequestDueToTimeout(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) serverSocketPath, stop := runSSHServer(t, cfg, WithUploadPackRequestTimeout(10*time.Microsecond)) defer stop() @@ -151,8 +150,7 @@ func requireFailedSSHStream(t *testing.T, recv func() (int32, error)) { } func TestFailedUploadPackRequestDueToValidationError(t *testing.T) { - cfg, cleanup := testcfg.Build(t) - defer cleanup() + cfg := testcfg.Build(t) serverSocketPath, stop := runSSHServer(t, cfg) defer stop() @@ -203,8 +201,7 @@ func TestFailedUploadPackRequestDueToValidationError(t *testing.T) { } func TestUploadPackCloneSuccess(t *testing.T) { - cfg, repo, repoPath, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, repoPath := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalyHooksBin(t, cfg) testhelper.ConfigureGitalySSHBin(t, cfg) @@ -275,8 +272,7 @@ func TestUploadPackCloneSuccess(t *testing.T) { } func TestUploadPackWithPackObjectsHook(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) filterDir, cleanup := testhelper.TempDir(t) defer cleanup() @@ -322,8 +318,7 @@ exec '%s' "$@" } func TestUploadPackWithoutSideband(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) @@ -367,8 +362,7 @@ func TestUploadPackWithoutSideband(t *testing.T) { } func TestUploadPackCloneWithPartialCloneFilter(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) @@ -426,8 +420,7 @@ func TestUploadPackCloneWithPartialCloneFilter(t *testing.T) { } func TestUploadPackCloneSuccessWithGitProtocol(t *testing.T) { - cfg, repo, repoPath, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, repoPath := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) @@ -474,8 +467,7 @@ func TestUploadPackCloneSuccessWithGitProtocol(t *testing.T) { } func TestUploadPackCloneHideTags(t *testing.T) { - cfg, repo, repoPath, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, repoPath := testcfg.BuildWithRepo(t) testhelper.ConfigureGitalySSHBin(t, cfg) testhelper.ConfigureGitalyHooksBin(t, cfg) @@ -507,8 +499,7 @@ func TestUploadPackCloneHideTags(t *testing.T) { } func TestUploadPackCloneFailure(t *testing.T) { - cfg, repo, _, cleanup := testcfg.BuildWithRepo(t) - defer cleanup() + cfg, repo, _ := testcfg.BuildWithRepo(t) serverSocketPath, stop := runSSHServer(t, cfg) defer stop() |