diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2020-09-21 04:47:01 +0000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2020-09-21 04:47:01 +0000 |
commit | 1a2bfecd2f0ebb8e31f9833e0522c4643797041b (patch) | |
tree | d17cf7bff45492a587027851bb6e0bcb493cff58 /client/httpsclient_test.go | |
parent | f100e7e83943b3bb5db232f5bf79a616fdba88f1 (diff) | |
parent | a487572a904cc149840488eefdfe121173d8bcb5 (diff) | |
download | gitlab-shell-1a2bfecd2f0ebb8e31f9833e0522c4643797041b.tar.gz |
Merge branch 'sh-extract-context-from-env' into 'master'
Make it possible to propagate correlation ID across processes
Closes #474
See merge request gitlab-org/gitlab-shell!413
Diffstat (limited to 'client/httpsclient_test.go')
-rw-r--r-- | client/httpsclient_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/httpsclient_test.go b/client/httpsclient_test.go index 1c7435f..0cf77e3 100644 --- a/client/httpsclient_test.go +++ b/client/httpsclient_test.go @@ -1,6 +1,7 @@ package client import ( + "context" "fmt" "io/ioutil" "net/http" @@ -43,7 +44,7 @@ func TestSuccessfulRequests(t *testing.T) { client, cleanup := setupWithRequests(t, tc.caFile, tc.caPath, tc.selfSigned) defer cleanup() - response, err := client.Get("/hello") + response, err := client.Get(context.Background(), "/hello") require.NoError(t, err) require.NotNil(t, response) @@ -80,7 +81,7 @@ func TestFailedRequests(t *testing.T) { client, cleanup := setupWithRequests(t, tc.caFile, tc.caPath, false) defer cleanup() - _, err := client.Get("/hello") + _, err := client.Get(context.Background(), "/hello") require.Error(t, err) assert.Equal(t, err.Error(), "Internal API unreachable") |