diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-07-29 15:59:23 +0800 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-07-31 12:03:43 +0800 |
commit | 592823d5e25006331b361b36cc61df7802fc1938 (patch) | |
tree | e5dfda205795e9526eb94866de65073cd6a83915 /go/internal/gitlabnet/lfsauthenticate/client_test.go | |
parent | 3b0176df497263323da2fae793a79b568502e6db (diff) | |
download | gitlab-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/gitlabnet/lfsauthenticate/client_test.go')
-rw-r--r-- | go/internal/gitlabnet/lfsauthenticate/client_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/go/internal/gitlabnet/lfsauthenticate/client_test.go b/go/internal/gitlabnet/lfsauthenticate/client_test.go index 7fd7aca..07484a7 100644 --- a/go/internal/gitlabnet/lfsauthenticate/client_test.go +++ b/go/internal/gitlabnet/lfsauthenticate/client_test.go @@ -59,22 +59,22 @@ func TestFailedRequests(t *testing.T) { testCases := []struct { desc string - args *commandargs.CommandArgs + args *commandargs.Shell expectedOutput string }{ { desc: "With bad response", - args: &commandargs.CommandArgs{GitlabKeyId: "-1", CommandType: commandargs.UploadPack}, + args: &commandargs.Shell{GitlabKeyId: "-1", CommandType: commandargs.UploadPack}, expectedOutput: "Parsing failed", }, { desc: "With API returns an error", - args: &commandargs.CommandArgs{GitlabKeyId: "forbidden", CommandType: commandargs.UploadPack}, + args: &commandargs.Shell{GitlabKeyId: "forbidden", CommandType: commandargs.UploadPack}, expectedOutput: "Internal API error (403)", }, { desc: "With API fails", - args: &commandargs.CommandArgs{GitlabKeyId: "broken", CommandType: commandargs.UploadPack}, + args: &commandargs.Shell{GitlabKeyId: "broken", CommandType: commandargs.UploadPack}, expectedOutput: "Internal API error (500)", }, } @@ -99,7 +99,7 @@ func TestSuccessfulRequests(t *testing.T) { url, cleanup := testserver.StartHttpServer(t, requests) defer cleanup() - args := &commandargs.CommandArgs{GitlabKeyId: keyId, CommandType: commandargs.LfsAuthenticate} + args := &commandargs.Shell{GitlabKeyId: keyId, CommandType: commandargs.LfsAuthenticate} client, err := NewClient(&config.Config{GitlabUrl: url}, args) require.NoError(t, err) |