Skip to content
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

Ensure tests verify request params #1047

merged 3 commits into from Aug 2, 2022


Copy link

No description provided.

@@ -259,7 +279,7 @@ func TestAPIs(t *testing.T) {
reqPath: "/api/v1/query",
reqParam: url.Values{
"query": []string{"2"},
"time": []string{testTime.Format(time.RFC3339Nano)},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests formatted via testTime.Format(time.RFC3339Nano) currently fail with the following error message:

unexpected request parameters: want map[query:[2] time:[1651799194.268618]], got map[query:[2] time:[2022-05-06T02:06:34.268618+01:00]]

so I've updated the tests to use formatTime for the time being, which is the same function used by the client.

@kakkoyun kakkoyun added this to the v1.13.0 milestone Jun 17, 2022
Copy link

We've removed 1.16 support. It worths rebasing #1062

Copy link
Contributor Author

@kakkoyun Okay, thanks. Hoping to getting around finishing this PR soon.

Signed-off-by: Joseph Woodward <>
Signed-off-by: Joseph Woodward <>
Copy link

bwplotka commented Aug 2, 2022

Rebased your PR if you don't mind 🙈

@bwplotka bwplotka marked this pull request as ready for review August 2, 2022 08:55
Signed-off-by: bwplotka <>
@bwplotka bwplotka merged commit 44ce5e1 into prometheus:main Aug 2, 2022
6 checks passed
@josephwoodward josephwoodward deleted the 1034_verify_request_params branch August 8, 2022 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants