Skip to content

Commit

Permalink
remove secret triggering fake variable
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-denoble committed May 3, 2024
1 parent 505a4ff commit 67b7090
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pinecone/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (ts *ClientTests) TestHeadersAppliedToRequests() {

func (ts *ClientTests) TestAuthorizationHeaderOverridesApiKey() {
apiKey := "test-api-key"
headers := map[string]string{"Authorization": "bearer abcd123467890"}
headers := map[string]string{"Authorization": "bearer foo"}

httpClient := mocks.CreateMockClient(`{"indexes": []}`)
client, err := NewClient(NewClientParams{ApiKey: apiKey, Headers: headers, RestClient: httpClient})
Expand All @@ -161,8 +161,8 @@ func (ts *ClientTests) TestAuthorizationHeaderOverridesApiKey() {

apiKeyHeaderValue := mockTransport.Req.Header.Get("Api-Key")
authHeaderValue := mockTransport.Req.Header.Get("Authorization")
if authHeaderValue != "bearer abcd123467890" {
ts.FailNow(fmt.Sprintf("Expected request to have header value 'bearer abcd123467890', but got '%s'", authHeaderValue))
if authHeaderValue != "bearer foo" {
ts.FailNow(fmt.Sprintf("Expected request to have header value 'bearer foo', but got '%s'", authHeaderValue))
}
if apiKeyHeaderValue != "" {
ts.FailNow(fmt.Sprintf("Expected request to not have Api-Key header, but got '%s'", apiKeyHeaderValue))
Expand Down

0 comments on commit 67b7090

Please sign in to comment.