summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2020-04-03 16:26:50 +1100
committerAsh McKenzie <amckenzie@gitlab.com>2020-04-17 16:23:33 +1000
commit8e5c72d7700cc0aebac9475144a9d30e97951ef0 (patch)
tree97ecbd82972caaf3c433f2f9064c811ceeb99721 /internal
parent76f528fbd3c87434e7ca9873f1840682eee72095 (diff)
downloadgitlab-shell-8e5c72d7700cc0aebac9475144a9d30e97951ef0.tar.gz
Rename action to be more accurate
Diffstat (limited to 'internal')
-rw-r--r--internal/gitlabnet/accessverifier/client_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/gitlabnet/accessverifier/client_test.go b/internal/gitlabnet/accessverifier/client_test.go
index 451b6b3..19962a8 100644
--- a/internal/gitlabnet/accessverifier/client_test.go
+++ b/internal/gitlabnet/accessverifier/client_test.go
@@ -18,8 +18,8 @@ import (
)
var (
- repo = "group/private"
- action = commandargs.ReceivePack
+ repo = "group/private"
+ receivePackAction = commandargs.ReceivePack
)
func buildExpectedResponse(who string) *Response {
@@ -73,7 +73,7 @@ func TestSuccessfulResponses(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
- result, err := client.Verify(tc.args, action, repo)
+ result, err := client.Verify(tc.args, receivePackAction, repo)
require.NoError(t, err)
response := buildExpectedResponse(tc.who)
@@ -87,7 +87,7 @@ func TestGetCustomAction(t *testing.T) {
defer cleanup()
args := &commandargs.Shell{GitlabUsername: "custom"}
- result, err := client.Verify(args, action, repo)
+ result, err := client.Verify(args, receivePackAction, repo)
require.NoError(t, err)
response := buildExpectedResponse("user-1")
@@ -134,7 +134,7 @@ func TestErrorResponses(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
args := &commandargs.Shell{GitlabKeyId: tc.fakeId}
- resp, err := client.Verify(args, action, repo)
+ resp, err := client.Verify(args, receivePackAction, repo)
require.EqualError(t, err, tc.expectedError)
require.Nil(t, resp)