diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-14 03:43:08 +0000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-14 03:43:08 +0000 |
commit | f34e2cd5c4194aa8bb049e1ac8aa1b2f002395b5 (patch) | |
tree | 6a12b351838af281ae2ad34a4340231f2a030d49 /go/internal/command/command_test.go | |
parent | 4812f6478771a6d261eb4a5c3aa4b450333fbf00 (diff) | |
parent | 1962b49971cf1602ed5ee20b33193e10022cf8cb (diff) | |
download | gitlab-shell-f34e2cd5c4194aa8bb049e1ac8aa1b2f002395b5.tar.gz |
Merge branch '181-authorized-principals-check-go' into 'master'
Implement AuthorizedPrincipals command
Closes #181
See merge request gitlab-org/gitlab-shell!322
Diffstat (limited to 'go/internal/command/command_test.go')
-rw-r--r-- | go/internal/command/command_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/go/internal/command/command_test.go b/go/internal/command/command_test.go index b651c78..e7e37d8 100644 --- a/go/internal/command/command_test.go +++ b/go/internal/command/command_test.go @@ -6,6 +6,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/authorizedprincipals" "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" @@ -136,6 +137,16 @@ func TestNew(t *testing.T) { expectedType: &authorizedkeys.Command{}, }, { + desc: "it returns a AuthorizedPrincipals command if the feature is enabled", + executable: &executable.Executable{Name: executable.AuthorizedPrincipalsCheck}, + config: &config.Config{ + Migration: config.MigrationConfig{Enabled: true, Features: []string{"gitlab-shell-authorized-principals-check"}}, + }, + environment: map[string]string{}, + arguments: []string{"key", "principal"}, + expectedType: &authorizedprincipals.Command{}, + }, + { desc: "it returns a Fallback command if the feature is unimplemented", executable: &executable.Executable{Name: executable.GitlabShell}, config: &config.Config{ |