Thanos: query: add tests for endpoints + prefix tests

Created on 10 May 2020  路  8Comments  路  Source: thanos-io/thanos

Coming from https://github.com/thanos-io/thanos/issues/2514#issuecomment-618513836.

We should add some similar tests to what Prometheus has here: https://github.com/prometheus/prometheus/blob/84b4d079c8714be8e8ad071a35b0391df270364c/web/web_test.go#L92. AFAICT it should be pretty easy to do:

  • Refactor the route registering and starting of the HTTP server into a separate function
  • Call it from a test & check all of the endpoints
  • Add a test on what happens if a prefix has been specified

Should prevent https://github.com/thanos-io/thanos/issues/2581. Making a separate issue for this because this should encompass all of the endpoints that we expose to our users.

query easy feature request / improvement help wanted stale

All 8 comments

:+1:

Help wanted

I'll take a stab if there's no objection!

Hello 馃憢 Looks like there was no activity on this issue for last 30 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 馃
If there will be no activity for next week, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@GiedriusS Does https://github.com/thanos-io/thanos/pull/2714 satisfy all the needs here?

hm not quite, I think we should still test for combinations for external web prefix + web prefix. We identified last week that these are not yet completely correctly handled

External/route prefix tests are being added in https://github.com/thanos-io/thanos/pull/2800.

Hello 馃憢 Looks like there was no activity on this issue for last 30 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 馃
If there will be no activity for next week, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

They have been added, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hedeesaa picture hedeesaa  路  3Comments

bwplotka picture bwplotka  路  3Comments

sbocz picture sbocz  路  4Comments

rmrf picture rmrf  路  4Comments

bwplotka picture bwplotka  路  4Comments