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

Requests.reset_request_journal() doesn't work with Wiremock V3 #95

Open
EvgeniyaGorobets opened this issue Sep 7, 2023 · 2 comments
Open
Labels
bug good first issue Good issue to get started with the project

Comments

@EvgeniyaGorobets
Copy link

EvgeniyaGorobets commented Sep 7, 2023

Apologies if this is considered in scope for #91, but I wanted to call out a specific bug.

The class method Requests.reset_request_journal() (code) throws a 404 NotFoundException after upgrading to Wiremock V3, because the POST __admin/requests/reset endpoint was deleted: wiremock/wiremock@47d4201#diff-629cfdfeca71797a13d4138932081242b849e382a194fd6784736ce83c310350L84

I believe this method should call DELETE __admin/requests instead, since this endpoint fires the new ResetRequestsTask: https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/admin/AdminRoutes.java#L84

Reproduction steps

Start up wiremock and call Requests.reset_request_journal()

References

No response

@EvgeniyaGorobets
Copy link
Author

EvgeniyaGorobets commented Sep 7, 2023

I tried to make a branch with the proposed fix but I got permission denied when I tried to push my branch to GitHub. Here's what I think that method should look like:

@classmethod
def reset_request_journal(cls, parameters={}):
    response = cls.REST_CLIENT.delete(cls.get_base_uri(cls.endpoint()), headers=make_headers(), params=parameters)
    return cls.REST_CLIENT.handle_response(response)

@oleg-nenashev oleg-nenashev added this to the WireMock Python 3.0 milestone Oct 11, 2023
@oleg-nenashev
Copy link
Member

Sorry, I missed this issue. Indeed, it needs to be updated as a Part of the WireMock 3 compatibility effort

@oleg-nenashev oleg-nenashev added the good first issue Good issue to get started with the project label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good issue to get started with the project
Projects
None yet
Development

No branches or pull requests

2 participants