Skip to content

Commit a8d13f3

Browse files
committed
fix integration test
Signed-off-by: Ben Ye <[email protected]>
1 parent 491c4c6 commit a8d13f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

integration/e2ecortex/client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ func (c *Client) RemoteRead(matchers []*labels.Matcher, start, end time.Time, st
167167
Start: startMs,
168168
End: endMs,
169169
})
170+
if err != nil {
171+
return nil, err
172+
}
170173

171174
req := &prompb.ReadRequest{
172175
Queries: []*prompb.Query{q},
@@ -184,6 +187,9 @@ func (c *Client) RemoteRead(matchers []*labels.Matcher, start, end time.Time, st
184187
defer cancel()
185188

186189
httpReq, err := http.NewRequestWithContext(httpReqCtx, "POST", "http://"+c.querierAddress+"/prometheus/api/v1/read", bytes.NewReader(compressed))
190+
if err != nil {
191+
return nil, err
192+
}
187193
httpReq.Header.Set("X-Scope-OrgID", "user-1")
188194
httpReq.Header.Add("Content-Encoding", "snappy")
189195
httpReq.Header.Add("Accept-Encoding", "snappy")

0 commit comments

Comments
 (0)