summaryrefslogtreecommitdiff
path: root/internal/command/command_test.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2020-12-10 14:40:31 +0000
committerIgor Drozdov <idrozdov@gitlab.com>2020-12-10 14:40:31 +0000
commit2fb14fb46bf4cffe8aff4a31794ae9d3588aac78 (patch)
treec4d4057fcdc5753086493c71b10f9ea5ee7b84d5 /internal/command/command_test.go
parent384f3036e3d9c501e29a7ce24ece1e887a14d53a (diff)
parent1293a33014c9cfc82b0bc1b9525987476b2aa857 (diff)
downloadgitlab-shell-2fb14fb46bf4cffe8aff4a31794ae9d3588aac78.tar.gz
Merge branch 'if-270554-2fa_verify_command' into 'main'
Add 2fa_verify command See merge request gitlab-org/gitlab-shell!440
Diffstat (limited to 'internal/command/command_test.go')
-rw-r--r--internal/command/command_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/command/command_test.go b/internal/command/command_test.go
index c2a7483..d134e61 100644
--- a/internal/command/command_test.go
+++ b/internal/command/command_test.go
@@ -16,6 +16,7 @@ import (
"gitlab.com/gitlab-org/gitlab-shell/internal/command/receivepack"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/shared/disallowedcommand"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/twofactorrecover"
+ "gitlab.com/gitlab-org/gitlab-shell/internal/command/twofactorverify"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/uploadarchive"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/uploadpack"
"gitlab.com/gitlab-org/gitlab-shell/internal/config"
@@ -76,6 +77,14 @@ func TestNew(t *testing.T) {
expectedSslCertDir: "",
},
{
+ desc: "it returns a TwoFactorVerify command",
+ executable: gitlabShellExec,
+ environment: buildEnv("2fa_verify"),
+ config: basicConfig,
+ expectedType: &twofactorverify.Command{},
+ expectedSslCertDir: "",
+ },
+ {
desc: "it returns an LfsAuthenticate command",
executable: gitlabShellExec,
environment: buildEnv("git-lfs-authenticate"),