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
Hello,
We have an issue that after migration some Pact tests fail. It seems that the test ignores the matching rule for the date in contract.
Matching rule: "$.entity.month": { "matchers": [ { "match": "date", "format": "yyyy-MM" } ],
Maven dependency:
<dependency> <groupId>au.com.dius.pact</groupId> <artifactId>consumer</artifactId> <version>4.1.24</version> <scope>test</scope> </dependency> <dependency> <groupId>au.com.dius.pact.consumer</groupId> <artifactId>java8</artifactId> <version>4.1.24</version> <scope>test</scope> </dependency> <dependency> <groupId>au.com.dius.pact.consumer</groupId> <artifactId>junit5</artifactId> <version>4.1.24</version> <scope>test</scope> </dependency> <dependency> <groupId>au.com.dius.pact.provider</groupId> <artifactId>junit5</artifactId> <version>4.1.24</version> <scope>test</scope> </dependency>
The tested event has a field in format "yyyy-mm". However, I get the following output:
1.1) body: $.entity.month Expected "2023-02" to match a date of 'yyyy-MM-dd': Unable to parse the date: 2023-02
It seems that the field "format" of matcher is just ignored and the test expects a date in standard format.
I have tried to change the version of pact provider and consumer. But it didn't help at all. Can it be a Java version issue?
Expected behaviour: the test is green.
Environment: Java 17, Kotlin
Please tell me if you need extra information! And thank you in advance.
The text was updated successfully, but these errors were encountered:
The issue was solved after I updated the dependency to 4.1.41
Sorry, something went wrong.
No branches or pull requests
Hello,
We have an issue that after migration some Pact tests fail. It seems that the test ignores the matching rule for the date in contract.
Matching rule:
"$.entity.month": {
"matchers": [
{
"match": "date",
"format": "yyyy-MM"
}
],
Maven dependency:
The tested event has a field in format "yyyy-mm". However, I get the following output:
1.1) body: $.entity.month Expected "2023-02" to match a date of 'yyyy-MM-dd': Unable to parse the date: 2023-02
It seems that the field "format" of matcher is just ignored and the test expects a date in standard format.
I have tried to change the version of pact provider and consumer. But it didn't help at all. Can it be a Java version issue?
Expected behaviour: the test is green.
Environment: Java 17, Kotlin
Please tell me if you need extra information! And thank you in advance.
The text was updated successfully, but these errors were encountered: