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>2020-03-13 19:16:02 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-03-16 14:06:35 +0300
commita95cf2d3a0dd0a5c835f39735f6aab4e13b410c4 (patch)
treeb68111bb31c93ed2bb5b2e96a9c08a33d1d305fe
parent70776dc9196fde982daec2d7496ef57a081c04eb (diff)
ssh: upload_pack: Extend `cloneCommand` to accept feature flags
With new support for adding feature flags in gitaly-ssh via the GITALY_FEATUREFLAG environment variable, let's extend `cloneCommand` to accept another parameter that is an array of desired feature flags. This allows us to test partial clones, which currently requires a specific feature flag in order to enable it.
-rw-r--r--internal/service/ssh/upload_pack_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/service/ssh/upload_pack_test.go b/internal/service/ssh/upload_pack_test.go
index 5f543b963..4445d724b 100644
--- a/internal/service/ssh/upload_pack_test.go
+++ b/internal/service/ssh/upload_pack_test.go
@@ -24,6 +24,7 @@ type cloneCommand struct {
command *exec.Cmd
repository *gitalypb.Repository
server string
+ featureFlags []string
gitConfig string
gitProtocol string
}
@@ -44,6 +45,7 @@ func (cmd cloneCommand) execute(t *testing.T) error {
cmd.command.Env = []string{
fmt.Sprintf("GITALY_ADDRESS=%s", cmd.server),
fmt.Sprintf("GITALY_PAYLOAD=%s", payload),
+ fmt.Sprintf("GITALY_FEATUREFLAGS=%s", strings.Join(cmd.featureFlags, ",")),
fmt.Sprintf("PATH=.:%s", os.Getenv("PATH")),
fmt.Sprintf(`GIT_SSH_COMMAND=%s upload-pack`, gitalySSHPath),
}