summaryrefslogtreecommitdiff
path: root/client/client_test.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2022-08-03 16:19:50 +0200
committerIgor Drozdov <idrozdov@gitlab.com>2022-08-03 16:19:50 +0200
commitd410fbdb0d450ee6807dac3e2ccde49df1498d5e (patch)
tree71703ab2db8de8f4abc4433bcbb5454da376a0c8 /client/client_test.go
parent8f2a4e90923a852eb386885b9379d5953fd8781b (diff)
downloadgitlab-shell-id-try-different-mr.tar.gz
Try changes from a different MRid-try-different-mr
Diffstat (limited to 'client/client_test.go')
-rw-r--r--client/client_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/client_test.go b/client/client_test.go
index 37f7d3c..e91d3da 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -77,6 +77,7 @@ func TestClients(t *testing.T) {
testAuthenticationHeader(t, client)
testJWTAuthenticationHeader(t, client)
testXForwardedForHeader(t, client)
+ testHostWithTrailingSlash(t, client)
})
}
}
@@ -237,6 +238,16 @@ func testXForwardedForHeader(t *testing.T, client *GitlabNetClient) {
})
}
+func testHostWithTrailingSlash(t *testing.T, client *GitlabNetClient) {
+ oldHost := client.httpClient.Host
+ client.httpClient.Host = oldHost + "/"
+
+ testSuccessfulGet(t, client)
+ testSuccessfulPost(t, client)
+
+ client.httpClient.Host = oldHost
+}
+
func buildRequests(t *testing.T, relativeURLRoot string) []testserver.TestRequestHandler {
requests := []testserver.TestRequestHandler{
{