summaryrefslogtreecommitdiff
path: root/go/internal/command/command_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/internal/command/command_test.go')
-rw-r--r--go/internal/command/command_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/go/internal/command/command_test.go b/go/internal/command/command_test.go
index ea88a6a..b651c78 100644
--- a/go/internal/command/command_test.go
+++ b/go/internal/command/command_test.go
@@ -5,6 +5,7 @@ import (
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitlab-shell/go/internal/command/authorizedkeys"
"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"
@@ -125,6 +126,16 @@ func TestNew(t *testing.T) {
expectedType: &uploadarchive.Command{},
},
{
+ desc: "it returns a AuthorizedKeys command if the feature is enabled",
+ executable: &executable.Executable{Name: executable.AuthorizedKeysCheck},
+ config: &config.Config{
+ Migration: config.MigrationConfig{Enabled: true, Features: []string{"gitlab-shell-authorized-keys-check"}},
+ },
+ environment: map[string]string{},
+ arguments: []string{"git", "git", "key"},
+ expectedType: &authorizedkeys.Command{},
+ },
+ {
desc: "it returns a Fallback command if the feature is unimplemented",
executable: &executable.Executable{Name: executable.GitlabShell},
config: &config.Config{