diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2022-05-04 04:55:58 +0000 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2022-05-04 04:55:58 +0000 |
commit | d43b496296d97cdab5f7caa0895a3f9cda027410 (patch) | |
tree | ff0878b5a1117a2cd05608237d5c852b6adfb126 /internal/gitlabnet/accessverifier/client_test.go | |
parent | 4828228c95cf9789614a04df06d3d55dda63b2ca (diff) | |
parent | b2b31cee4a27cccd100a5f0aa546d5a515576ada (diff) | |
download | gitlab-shell-d43b496296d97cdab5f7caa0895a3f9cda027410.tar.gz |
Merge branch 'jv-always-use-sidechannel' into 'main'
Always use Gitaly sidechannel connections
See merge request gitlab-org/gitlab-shell!567
Diffstat (limited to 'internal/gitlabnet/accessverifier/client_test.go')
-rw-r--r-- | internal/gitlabnet/accessverifier/client_test.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/internal/gitlabnet/accessverifier/client_test.go b/internal/gitlabnet/accessverifier/client_test.go index 60e3f0e..13e2d2c 100644 --- a/internal/gitlabnet/accessverifier/client_test.go +++ b/internal/gitlabnet/accessverifier/client_test.go @@ -86,41 +86,6 @@ func TestSuccessfulResponses(t *testing.T) { } } -func TestSidechannelFlag(t *testing.T) { - okResponse := testResponse{body: responseBody(t, "allowed_sidechannel.json"), status: http.StatusOK} - client := setup(t, - map[string]testResponse{"first": okResponse}, - map[string]testResponse{"1": okResponse}, - ) - - testCases := []struct { - desc string - args *commandargs.Shell - who string - }{ - { - desc: "Provide key id within the request", - args: &commandargs.Shell{GitlabKeyId: "1"}, - who: "key-1", - }, { - desc: "Provide username within the request", - args: &commandargs.Shell{GitlabUsername: "first"}, - who: "user-1", - }, - } - - for _, tc := range testCases { - t.Run(tc.desc, func(t *testing.T) { - result, err := client.Verify(context.Background(), tc.args, uploadPackAction, repo) - require.NoError(t, err) - - response := buildExpectedResponse(tc.who) - response.Gitaly.UseSidechannel = true - require.Equal(t, response, result) - }) - } -} - func TestGeoPushGetCustomAction(t *testing.T) { client := setup(t, map[string]testResponse{ "custom": { |