Open EvgeniyaGorobets opened 1 year ago
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)
Sorry, I missed this issue. Indeed, it needs to be updated as a Part of the WireMock 3 compatibility effort
Apologies if this is considered in scope for https://github.com/wiremock/python-wiremock/issues/91, but I wanted to call out a specific bug.
The class method
Requests.reset_request_journal()
(code) throws a404 NotFoundException
after upgrading to Wiremock V3, because thePOST __admin/requests/reset
endpoint was deleted: https://github.com/wiremock/wiremock/commit/47d420197738bb28ece30a2d7c86c7f828bf985f#diff-629cfdfeca71797a13d4138932081242b849e382a194fd6784736ce83c310350L84I believe this method should call
DELETE __admin/requests
instead, since this endpoint fires the newResetRequestsTask
: https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/admin/AdminRoutes.java#L84Reproduction steps
Start up wiremock and call
Requests.reset_request_journal()
References
No response