Skip to content

Add test to verify query response compression (#6849) #6877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

siddarth2810
Copy link

What this PR does:
Adds an integration test which checks the Content-Encoding header. This ensures that query response compression works correctly

Which issue(s) this PR fixes:
Fixes #6849

Checklist

  • Tests updated
  • [NA] Documentation added
  • [NA] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this is on the right direction. Thanks for the PR!

require.NoError(t, err)
require.Equal(t, 200, res.StatusCode)

storeGateway := e2ecortex.NewStoreGateway("store-gateway", e2ecortex.RingStoreConsul, consul.NetworkHTTPEndpoint(), flags, "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need store gateway in this test so let's remove it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, got it.


require.Equal(t, http.StatusOK, resp.StatusCode)
require.Empty(t, resp.Header.Get("Content-Encoding"))
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current tests are good. But I'd like to see we have test cases covering queries against query frontend as well. Not just querier

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh alright, I'l add a new endpoint with query frontend and update the tests. Thanks a lot for the review !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration test for query response compression
2 participants