Hi! We are trying out writing contract tests for o...
# pactflow
k
Hi! We are trying out writing contract tests for our asynchronous message (kafka in our case) following guide: https://docs.pact.io/recipes/kafka. The provider in this case is an existing pacticipant for other services, which are being tested bi-directional. So the provider has uploaded an openapi spec. However, this spec is only defines http request/response definitions, not asynchronous kafka messages. So when I uploaded the asynchronous consumer contract, I expected it to ignore the openapi spec completely, and wait for a provider test to provide the verification result. However, the broker immediatly says our consumer contract is verified as success. ...But how? Based on what? When I delete both the consumer and provider, and then upload the consumer contract, then it will correctly say unverified. But when I upload the provider contract again, which doesnt contain any information regarding asynchronous interfaces, the broker says the consumer contract is verified. Can someone help me understand this behavior? Do I need to provide additional information?
m
This is one of those edge cases, unfortunately. We have an internal tracking issue for it. Basically, the comparison between the OpenAPI and the pact file ignores non-HTTP requests. So when the consumer contract has only async interactions in it, it is effectively an “empty” pact and so is validated when compared to the OpenAPI file.