Skip to content

Commit

Permalink
Fix GCIR test (#220)
Browse files Browse the repository at this point in the history
The test was failing because the HTTP client we're using in the test seems to be automatically attaching a User Agent to all requests. So /initialize was evaluating the browser test gate incorrectly

![Screenshot 2024-08-20 at 11.23.46 AM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/ak7zkUsSoHh2VQAhtjtL/13f9b9ab-6698-46c3-a36a-6c228e43ce99.png)

Fixed by setting it to ""
![Screenshot 2024-08-20 at 11.23.28 AM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/ak7zkUsSoHh2VQAhtjtL/9c2b0e24-0a35-41ee-9f4a-6c634da3415b.png)
  • Loading branch information
kenny-statsig authored Aug 20, 2024
1 parent 3c50265 commit a85cc88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client_initialize_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func TestInitializeResponseConsistency(t *testing.T) {
req.Header.Add("STATSIG-CLIENT-TIME", strconv.FormatInt(getUnixMilli(), 10))
req.Header.Add("STATSIG-SDK-TYPE", getStatsigMetadata().SDKType)
req.Header.Add("STATSIG-SDK-VERSION", getStatsigMetadata().SDKVersion)
req.Header.Set("User-Agent", "")
client := http.Client{}
response, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit a85cc88

Please sign in to comment.