Francislainy Campos
12/01/2022, 12:01 PMKrishna Mohan Elluru
12/05/2022, 12:42 PMBasu Silviu
12/05/2022, 4:58 PMPact Junit 5 Extension
compiled in Java 8? It is impossible to move our monolith to Java 11, and I need to make use of the PactBrokerConsumerVersionSelectors
Riley Martine
12/06/2022, 10:29 PM.given
for a consumer.dsl.PactBuilder
? I'm trying to set a provider state on a pact, using the plugins framework. Working off of the example here.GitHub
12/07/2022, 8:21 PMBeth (pactflow.io/Pact Broker/pact-ruby)
Riley Martine
12/08/2022, 9:18 PMJayachandra K
12/10/2022, 11:04 PMrepositoryUrl
for the pacticipants?
I don’t want to use pact API . I would be keen to know to update the url while publishing pacts or running the testsÉdouard Lopez
12/12/2022, 9:16 AMHi there!
A small issue we just encounter with PACT. Our PACT consumer is green and was validated by the provider, so all seems good. But then, when we did our first test and we are facing a deserialization issue on the provider side. After investigating, the consumer is not serializing in the right way an enumeration value. The provider is expecting "`customer_order`" and the consumer is sending "`CUSTOMER_ORDER`".
So I did some test on the consumer, to understand why this has not broken the PACT on the consumer side. And it seems that the PACT consumer will broke if an expected field in the request is missing, but not if the values does not match... I am a bit sad about this behavior, I was expected the PACT to fully validate the body, field and value. This mean, we need to write additional integration test to validate the serialization of the consumer, not cool 😕! Or maybe we are missing a configuration somewhere? I haven't found something yetHis solution was to implement a matcher on the request field.
.stringMatcher(
"issuer_type",
"^("
+ Arrays.stream(IssuerTypeDTO.values())
.map(IssuerTypeDTO::getCode)
.collect(Collectors.joining("|"))
+ ")",
IssuerTypeDTO.CUSTOMER_ORDER.getCode())
I'm aware that Pact is not strict in the response's value but was expecting more control on the request content as per Postel's Law. Shoulduglyog
uglyog
uglyog
uglyog
uglyog
Laith
12/21/2022, 3:24 PM@PactBrokerAuth
annotation using a java system property, since the documentation says, “the token
, username
and password
values also take Java system property expressions”. A quick google of java system property expressions led me to Spring expression language, so I tried password = "#{systemProperties['pact.broker.password']}"
, and also password = "System.getProperty(\"pact.broker.password\")"
(where I’ve defined pact.broker.password
on the command line), but in both cases the string was interpreted literally. I’m not too familiar with spring, or java for that matter, would you be able to help me get the syntax right? ThanksGitHub
12/23/2022, 1:25 AMGitHub
12/23/2022, 3:23 AMGitHub
12/23/2022, 4:11 AMKarol Stępień
12/23/2022, 10:49 AMmvn pact:verify -Dpact.filter.pacturl=<https://pact-broker>....
but I got 401 and I don't know how to pass username and password
my pom.xml setup is following
<plugin>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>maven</artifactId>
<version>4.3.12</version>
<configuration>
<serviceProviders>
<serviceProvider>
<name>providerName</name>
<consumers>
<consumer>
<name>consumerName</name>
</consumer>
</consumers>
</serviceProvider>
</serviceProviders>
</configuration>
</plugin>
I was trying many things:
1. I used PactUrl annotation for running the same test from Intellij directly `@PactUrl(urls = {"https://pact-broker........"}, auth = @Authentication(username = "lalal", password = "lalal"))`and this is working fine ✅Michael Bailey
12/15/2021, 7:29 PMOleksandr Yanov
01/04/2023, 5:07 PMViacheslav Karamov
01/05/2023, 6:27 PM@ExtendWith(PactConsumerTestExt.class)
@Pact(provider = "order_provider", consumer = "order_consumer")
public V4Pact listOfOrdersPact(PactDslWithProvider builder) {
....
@Pact(provider = "order_provider", consumer = "order_consumer")
public V4Pact noOrdersPact(PactDslWithProvider builder) {
...
@Test
@PactTestFor(pactMethod = "listOfOrdersPact")
void getListOfOrders(MockServer mockServer) throws IOException {
...
@Test
@PactTestFor(pactMethod = "noOrdersPact")
void getEmptyListOfOrders(MockServer mockServer) throws IOException {
when I run any of these 2 tests I got an error:
The following methods annotated with @Pact were not executed during the test: OrderApiClientPactTest.noOrdersPact If these are currently a work in progress, add a @Disabled annotation to the method
Commenting out noOrdersPact
and its test fixes the issue. How to fix that?Yogesh HS
01/09/2023, 6:24 AM{
"error": {
"message": "source sequence is illegal/malformed utf-8",
"reference": "HjPEylMxlF"
}
}
Simon Petty
01/09/2023, 9:19 PMKevin de Boer
01/10/2023, 10:16 AMHarry
01/13/2023, 6:56 AMGitHub
01/16/2023, 2:19 AMThomas K
01/18/2023, 10:48 AMminArrayLike
for an array of json objects in Kotlin lambda dsl please?James Fraser
01/18/2023, 3:50 PMGitHub
01/19/2023, 2:22 AM