We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Citrus Version 4.2.1
Expected behavior
The Test should fail.
@Test public class OpenApiClientIT extends TestNGCitrusSpringSupport { private final int port = SocketUtils.findAvailableTcpPort(8080); @BindToRegistry private final HttpServer httpServer = new HttpServerBuilder() .port(port) .timeout(5000L) .autoStart(true) .defaultStatus(HttpStatus.NO_CONTENT) .build(); @BindToRegistry private final HttpClient httpClient = new HttpClientBuilder() .requestUrl("http://localhost:%d".formatted(port)) .build(); private final OpenApiSpecification petstoreSpec = OpenApiSpecification.from( Resources.create("classpath:org/citrusframework/openapi/petstore/petstore-v3.json")); @CitrusTest public void getPetById() { variable("petId", "1001"); when(openapi(petstoreSpec) .client(httpClient) .send("getPetById") .fork(true) .message() // ⏩ header is set here .header("correlationId", "my-correlation-id") ); then(http().server(httpServer) .receive() .get("/pet/1001") .message() // TODO BUG? - cannot check correlationId // see: org/citrusframework/validation/DefaultMessageHeaderValidator.java:68 // see: org.citrusframework.message.MessageHeaderUtils.isSpringInternalHeader // ⏩ this check should fail, but it does not 😱 .header("correlationId", "NOT-my-correlation-id") ); then(http().server(httpServer) .send() .response(HttpStatus.OK) .message() .body(Resources.create("classpath:org/citrusframework/openapi/petstore/pet.json")) .contentType("application/json")); then(openapi(petstoreSpec) .client(httpClient) .receive("getPetById", HttpStatus.OK)); } }
Actual behavior
The test does not fail.
Test case sample See: Expected behaviour
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Citrus Version
4.2.1
Expected behavior
The Test should fail.
Actual behavior
The test does not fail.
Test case sample
See: Expected behaviour
The text was updated successfully, but these errors were encountered: