summaryrefslogtreecommitdiff
path: root/go/internal/command/lfsauthenticate/lfsauthenticate_test.go
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-07-29 15:59:23 +0800
committerPatrick Bajao <ebajao@gitlab.com>2019-07-31 12:03:43 +0800
commit592823d5e25006331b361b36cc61df7802fc1938 (patch)
treee5dfda205795e9526eb94866de65073cd6a83915 /go/internal/command/lfsauthenticate/lfsauthenticate_test.go
parent3b0176df497263323da2fae793a79b568502e6db (diff)
downloadgitlab-shell-592823d5e25006331b361b36cc61df7802fc1938.tar.gz
Rename CommandArgs to Shell
Other functions are still expecting for `CommandArgs` instead of `Shell`. They should be expecting `commandargs.Shell` now since it has been renamed.
Diffstat (limited to 'go/internal/command/lfsauthenticate/lfsauthenticate_test.go')
-rw-r--r--go/internal/command/lfsauthenticate/lfsauthenticate_test.go10
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},
}