diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-05 05:03:16 +0000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-05 05:03:16 +0000 |
commit | c577eb9ed8bd0336870f7a83302f70821d510169 (patch) | |
tree | ed7f7281633d97933e4465a2ac0f86d62c9a216e /go/internal/command/lfsauthenticate/lfsauthenticate_test.go | |
parent | ed0460374a5ca13d9ea17c6a9c21151319b7fd53 (diff) | |
parent | 3b6f9f7583755e041e76142d7caf7716937907fa (diff) | |
download | gitlab-shell-c577eb9ed8bd0336870f7a83302f70821d510169.tar.gz |
Merge branch '181-migrate-gitlab-shell-checks-fallback' into 'master'
Support falling back to ruby version of checkers
See merge request gitlab-org/gitlab-shell!318
Diffstat (limited to 'go/internal/command/lfsauthenticate/lfsauthenticate_test.go')
-rw-r--r-- | go/internal/command/lfsauthenticate/lfsauthenticate_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/go/internal/command/lfsauthenticate/lfsauthenticate_test.go b/go/internal/command/lfsauthenticate/lfsauthenticate_test.go index 30da94b..a6836a8 100644 --- a/go/internal/command/lfsauthenticate/lfsauthenticate_test.go +++ b/go/internal/command/lfsauthenticate/lfsauthenticate_test.go @@ -25,22 +25,22 @@ func TestFailedRequests(t *testing.T) { testCases := []struct { desc string - arguments *commandargs.CommandArgs + arguments *commandargs.Shell expectedOutput string }{ { desc: "With missing arguments", - arguments: &commandargs.CommandArgs{}, + arguments: &commandargs.Shell{}, expectedOutput: "> GitLab: Disallowed command", }, { desc: "With disallowed command", - arguments: &commandargs.CommandArgs{GitlabKeyId: "1", SshArgs: []string{"git-lfs-authenticate", "group/repo", "unknown"}}, + arguments: &commandargs.Shell{GitlabKeyId: "1", SshArgs: []string{"git-lfs-authenticate", "group/repo", "unknown"}}, expectedOutput: "> GitLab: Disallowed command", }, { desc: "With disallowed user", - arguments: &commandargs.CommandArgs{GitlabKeyId: "disallowed", SshArgs: []string{"git-lfs-authenticate", "group/repo", "download"}}, + arguments: &commandargs.Shell{GitlabKeyId: "disallowed", SshArgs: []string{"git-lfs-authenticate", "group/repo", "download"}}, expectedOutput: "Disallowed by API call", }, } @@ -140,7 +140,7 @@ func TestLfsAuthenticateRequests(t *testing.T) { output := &bytes.Buffer{} cmd := &Command{ Config: &config.Config{GitlabUrl: url}, - Args: &commandargs.CommandArgs{GitlabUsername: tc.username, SshArgs: []string{"git-lfs-authenticate", "group/repo", "upload"}}, + Args: &commandargs.Shell{GitlabUsername: tc.username, SshArgs: []string{"git-lfs-authenticate", "group/repo", "upload"}}, ReadWriter: &readwriter.ReadWriter{ErrOut: output, Out: output}, } |