diff options
Diffstat (limited to 'go/internal/command/lfsauthenticate')
-rw-r--r-- | go/internal/command/lfsauthenticate/lfsauthenticate.go | 2 | ||||
-rw-r--r-- | go/internal/command/lfsauthenticate/lfsauthenticate_test.go | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/go/internal/command/lfsauthenticate/lfsauthenticate.go b/go/internal/command/lfsauthenticate/lfsauthenticate.go index c1dc45f..bff5e7f 100644 --- a/go/internal/command/lfsauthenticate/lfsauthenticate.go +++ b/go/internal/command/lfsauthenticate/lfsauthenticate.go @@ -20,7 +20,7 @@ const ( type Command struct { Config *config.Config - Args *commandargs.CommandArgs + Args *commandargs.Shell ReadWriter *readwriter.ReadWriter } 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}, } |