Conversation
| public void verifyParametersDefault() { | ||
| WireMockUtilsCriteria.verifyPostRequest(wireMock, "/v1/parameters/default", Map.of()); | ||
| } |
There was a problem hiding this comment.
I think we should use the method that already exists (with the param nbRequests at 1) so we don't end up with twice the number of function needed.
|
|
||
| public void stubGetResultCsv(String resultUuid, byte[] csvContent) { | ||
| wireMock.stubFor(WireMock.post(urlPathEqualTo("/v1/results/" + resultUuid + "/csv")) | ||
| .willReturn(aResponse() |
There was a problem hiding this comment.
why do we switch from WireMock.ok() to aResponse().withStatus(200) ?
There was a problem hiding this comment.
ok is more readable I agree
| } | ||
|
|
||
| public void stubParametersDefault(String statusJson) { | ||
| public void stubPostParametersDefault(String responseBody) { |
There was a problem hiding this comment.
we already have it
There was a problem hiding this comment.
we already have it
I don't think we should use the one from WireMockStubs, the goal is to remove all the methods that shoudn't be here in the first place so we need to put these functions in the appropriate Stubs class, which is what he did here. What we can do is remove this function from WireMockStubs but It's used elsewhere and it's not in the scope of this PR to change that in the other tests
There was a problem hiding this comment.
Yes that's what I suggested here #927 (comment)
But OK for cleaning in an other TS.
There was a problem hiding this comment.
I'll remove those in the deprecated class there's only one usage so it's fine
| public void verifyParameterPut(WireMockServer wireMockServer, String paramUuid) { | ||
| wireMockServer.verify( | ||
| putRequestedFor(urlEqualTo("/v1/parameters/" + paramUuid)) | ||
| putRequestedFor(urlEqualTo("/v1/parameters/" + paramUuid)) |
There was a problem hiding this comment.
Try to keep previous indentation to preserve the Git history
| WireMockUtilsCriteria.verifyPostRequest(wireMock, "/v1/parameters/default", Map.of(), nbRequests); | ||
| } | ||
|
|
||
| public void stubDeleteParameters(String parametersUuid) { |
There was a problem hiding this comment.
I think we should either delete parameters stubs from this class or from WireMockStubs but we shouldnt duplicate them
There was a problem hiding this comment.
I can delete the ones from WireMockStubs they don't seem widely used
| null); | ||
| } | ||
|
|
||
| public void stubParameterPut(String paramUuid, String responseJson) { |
There was a problem hiding this comment.
Moved those to computation stubs and deprecated pre existing faulty ones as discussed
|



PR Summary