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
merged 3 commits into from Aug 2, 2022

Conversation

josephwoodward
Copy link
Contributor

@josephwoodward josephwoodward commented May 6, 2022

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

@josephwoodward josephwoodward May 6, 2022

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
@kakkoyun
Copy link
Member

kakkoyun commented Jun 17, 2022

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

@josephwoodward
Copy link
Contributor Author

josephwoodward commented Jun 23, 2022

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

Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
@bwplotka bwplotka force-pushed the 1034_verify_request_params branch from 5480d34 to 778954f Compare Aug 2, 2022
@bwplotka
Copy link
Member

bwplotka commented Aug 2, 2022

Rebased your PR if you don't mind 🙈

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

Successfully merging this pull request may close these issues.

None yet

3 participants