diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-03-13 19:16:02 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-03-16 14:06:35 +0300 |
commit | a95cf2d3a0dd0a5c835f39735f6aab4e13b410c4 (patch) | |
tree | b68111bb31c93ed2bb5b2e96a9c08a33d1d305fe | |
parent | 70776dc9196fde982daec2d7496ef57a081c04eb (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.go | 2 |
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), } |