diff options
author | Małgorzata Ksionek <mksionek@gitlab.com> | 2019-09-23 09:48:01 +0200 |
---|---|---|
committer | Małgorzata Ksionek <mksionek@gitlab.com> | 2019-09-26 12:26:53 +0200 |
commit | 8071ea113454ae26ad9822c0a41efc5bc45f3de2 (patch) | |
tree | 6f8849952a892de5f9c4583e0ddc0059e26f59e2 /go/internal/gitlabnet/client_test.go | |
parent | 216bfafb4c0001a476e5ca630cd8c3baf7718d8d (diff) | |
download | gitlab-shell-8071ea113454ae26ad9822c0a41efc5bc45f3de2.tar.gz |
Add cr remarks
Diffstat (limited to 'go/internal/gitlabnet/client_test.go')
-rw-r--r-- | go/internal/gitlabnet/client_test.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/go/internal/gitlabnet/client_test.go b/go/internal/gitlabnet/client_test.go index 07ac7b8..3f25d3c 100644 --- a/go/internal/gitlabnet/client_test.go +++ b/go/internal/gitlabnet/client_test.go @@ -6,7 +6,6 @@ import ( "fmt" "io/ioutil" "net/http" - "os" "path" "testing" @@ -108,7 +107,7 @@ func TestClients(t *testing.T) { tc.config.GitlabUrl = url tc.config.Secret = "sssh, it's a secret" - + tc.config.IPAddr = "127.0.0.1" client, err := GetClient(tc.config) require.NoError(t, err) @@ -229,9 +228,6 @@ func testAuthenticationHeader(t *testing.T, client *GitlabClient) { func testXForwardedForHeader(t *testing.T, client *GitlabClient) { t.Run("X-Forwarded-For for GET", func(t *testing.T) { - err := os.Setenv("SSH_CONNECTION", "127.0.0.1 0") - require.Nil(t, err) - response, err := client.Get("/with_ip") require.NoError(t, err) @@ -241,7 +237,6 @@ func testXForwardedForHeader(t *testing.T, client *GitlabClient) { t.Run("X-Forwarded-For for POST", func(t *testing.T) { data := map[string]string{"key": "value"} - os.Setenv("SSH_CONNECTION", "127.0.0.1 0") response, err := client.Post("/with_ip", data) require.NoError(t, err) |