diff options
author | Igor <idrozdov@gitlab.com> | 2019-06-06 16:02:02 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-06-06 16:02:02 +0000 |
commit | 888cd2c4ecb7d8a82328c5b3d68545596466b1a2 (patch) | |
tree | 3557c79227b01376a90f381c5f60f0ef42727baa /go/internal/command/command_test.go | |
parent | eb2b186f7d209a638b7523c674bc79cbafe764b6 (diff) | |
download | gitlab-shell-888cd2c4ecb7d8a82328c5b3d68545596466b1a2.tar.gz |
Go implementation for LFS authenticate
Diffstat (limited to 'go/internal/command/command_test.go')
-rw-r--r-- | go/internal/command/command_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/go/internal/command/command_test.go b/go/internal/command/command_test.go index cbdfc56..07260dd 100644 --- a/go/internal/command/command_test.go +++ b/go/internal/command/command_test.go @@ -7,6 +7,7 @@ import ( "gitlab.com/gitlab-org/gitlab-shell/go/internal/command/discover" "gitlab.com/gitlab-org/gitlab-shell/go/internal/command/fallback" + "gitlab.com/gitlab-org/gitlab-shell/go/internal/command/lfsauthenticate" "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" @@ -59,6 +60,18 @@ func TestNew(t *testing.T) { expectedType: &twofactorrecover.Command{}, }, { + desc: "it returns an LfsAuthenticate command if the feature is enabled", + config: &config.Config{ + GitlabUrl: "http+unix://gitlab.socket", + Migration: config.MigrationConfig{Enabled: true, Features: []string{"git-lfs-authenticate"}}, + }, + environment: map[string]string{ + "SSH_CONNECTION": "1", + "SSH_ORIGINAL_COMMAND": "git-lfs-authenticate", + }, + expectedType: &lfsauthenticate.Command{}, + }, + { desc: "it returns a ReceivePack command if the feature is enabled", config: &config.Config{ GitlabUrl: "http+unix://gitlab.socket", |