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-16 14:29:55 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-03-16 14:29:55 +0300
commitad2503f87e760c76645e56ac05e00654a060c6d6 (patch)
tree69d6a1b276ca6524ac2e0f9b31bdcf53ba6a7923
parent3667390757dee9a299b177ec92aaf966f4a92dbb (diff)
ssh: Fix semantic merge conflict with testcfg changes
The testcfg package has recently been converted to use `t.Cleanup()` instead of the `testhelper.Deferrer()` in commit 0fc3e28a0 (Merge branch 'smh-remove-deferrer' into 'master', 2021-03-15). This has caused a semantic merge conflict with 366739075 (Merge branch 'ps-rm-config-ssh' into 'master', 2021-03-16). Fix the semantic merge conflict by dropping the removed cleanup return value.
-rw-r--r--internal/gitaly/service/ssh/receive_pack_test.go21
-rw-r--r--internal/gitaly/service/ssh/upload_archive_test.go9
-rw-r--r--internal/gitaly/service/ssh/upload_pack_test.go27
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()