summaryrefslogtreecommitdiff
path: root/go/internal/gitlabnet/accessverifier/client_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/gitlabnet/accessverifier/client_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/gitlabnet/accessverifier/client_test.go')
-rw-r--r--go/internal/gitlabnet/accessverifier/client_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/go/internal/gitlabnet/accessverifier/client_test.go b/go/internal/gitlabnet/accessverifier/client_test.go
index 31175ae..f534185 100644
--- a/go/internal/gitlabnet/accessverifier/client_test.go
+++ b/go/internal/gitlabnet/accessverifier/client_test.go
@@ -57,16 +57,16 @@ func TestSuccessfulResponses(t *testing.T) {
testCases := []struct {
desc string
- args *commandargs.CommandArgs
+ args *commandargs.Shell
who string
}{
{
desc: "Provide key id within the request",
- args: &commandargs.CommandArgs{GitlabKeyId: "1"},
+ args: &commandargs.Shell{GitlabKeyId: "1"},
who: "key-1",
}, {
desc: "Provide username within the request",
- args: &commandargs.CommandArgs{GitlabUsername: "first"},
+ args: &commandargs.Shell{GitlabUsername: "first"},
who: "user-1",
},
}
@@ -86,7 +86,7 @@ func TestGetCustomAction(t *testing.T) {
client, cleanup := setup(t)
defer cleanup()
- args := &commandargs.CommandArgs{GitlabUsername: "custom"}
+ args := &commandargs.Shell{GitlabUsername: "custom"}
result, err := client.Verify(args, action, repo)
require.NoError(t, err)
@@ -134,7 +134,7 @@ func TestErrorResponses(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
- args := &commandargs.CommandArgs{GitlabKeyId: tc.fakeId}
+ args := &commandargs.Shell{GitlabKeyId: tc.fakeId}
resp, err := client.Verify(args, action, repo)
require.EqualError(t, err, tc.expectedError)