summaryrefslogtreecommitdiff
path: root/go/internal/command/command_test.go
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-06-05 15:53:33 +0000
committerNick Thomas <nick@gitlab.com>2019-06-05 15:53:33 +0000
commiteb2b186f7d209a638b7523c674bc79cbafe764b6 (patch)
treea425982099197962547ce903899d2456434736a6 /go/internal/command/command_test.go
parentf61185b8a8f8974225a701137ba4b75cf5d4c4ef (diff)
parent60e258e32b5df579136ba3cf10f7f07eb8206415 (diff)
downloadgitlab-shell-eb2b186f7d209a638b7523c674bc79cbafe764b6.tar.gz
Merge branch 'id-git-upload-archive' into 'master'
Go implementation for git-upload-archive Closes #162 See merge request gitlab-org/gitlab-shell!307
Diffstat (limited to 'go/internal/command/command_test.go')
-rw-r--r--go/internal/command/command_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/go/internal/command/command_test.go b/go/internal/command/command_test.go
index 37db89f..cbdfc56 100644
--- a/go/internal/command/command_test.go
+++ b/go/internal/command/command_test.go
@@ -9,6 +9,7 @@ import (
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/fallback"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/receivepack"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/twofactorrecover"
+ "gitlab.com/gitlab-org/gitlab-shell/go/internal/command/uploadarchive"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/uploadpack"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/config"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/testhelper"
@@ -82,6 +83,18 @@ func TestNew(t *testing.T) {
expectedType: &uploadpack.Command{},
},
{
+ desc: "it returns a UploadArchive command if the feature is enabled",
+ config: &config.Config{
+ GitlabUrl: "http+unix://gitlab.socket",
+ Migration: config.MigrationConfig{Enabled: true, Features: []string{"git-upload-archive"}},
+ },
+ environment: map[string]string{
+ "SSH_CONNECTION": "1",
+ "SSH_ORIGINAL_COMMAND": "git-upload-archive",
+ },
+ expectedType: &uploadarchive.Command{},
+ },
+ {
desc: "it returns a Fallback command if the feature is unimplemented",
config: &config.Config{
GitlabUrl: "http+unix://gitlab.socket",