Skip to content

Commit

Permalink
Drop unnecessary method
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala committed Nov 9, 2021
1 parent 6a7aab5 commit ec1a613
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions integration/e2e/compression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func TestCompression(t *testing.T) {
func queryAndAssertTraceCompression(t *testing.T, client *tempoUtil.Client, info *tempoUtil.TraceInfo) {

// The received client will strip the header before we have a chance to inspect it, so just validate that the compressed client works as expected.
result, resp, err := client.QueryTraceWithResponse(info.HexID())
result, err := client.QueryTrace(info.HexID())
require.NoError(t, err)
require.NotNil(t, resp)
require.NotNil(t, result)

expected, err := info.ConstructTraceFromEpoch()
require.NoError(t, err)
Expand Down
11 changes: 3 additions & 8 deletions pkg/util/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,14 @@ func (c *Client) Search(tags string) (*tempopb.SearchResponse, error) {
}

func (c *Client) QueryTrace(id string) (*tempopb.Trace, error) {
m, _, err := c.QueryTraceWithResponse(id)
return m, err
}

func (c *Client) QueryTraceWithResponse(id string) (*tempopb.Trace, *http.Response, error) {
m := &tempopb.Trace{}
resp, err := c.getFor(c.BaseURL+QueryTraceEndpoint+"/"+id, m)
if err != nil {
if resp.StatusCode == http.StatusNotFound {
return nil, resp, ErrTraceNotFound
return nil, ErrTraceNotFound
}
return nil, resp, err
return nil, err
}

return m, resp, nil
return m, nil
}

0 comments on commit ec1a613

Please sign in to comment.