Thai Le
10/12/2022, 9:36 PMmvn -DpipelineBuild=true --activate-profiles maven-profile,provider-pact-test -Dpackbroker.scheme=http -Dpactbroker.host=localhost -Dpactbroker.port=9292 -Dpactbroker.auth.username=pact_workshop -Dpactbroker.auth.password=pact_workshop -Dpact.provider.version="7.0.36-$(git rev-parse --short HEAD)" -Dpactbroker.enablePending=false -Dpact.verifier.publishResults=true --projects 60000-demo-service/demo-service --also-make -f all-modules-pom.xml clean verify
and i see pact tries to verify this version of provider against all versions of consumer. Is there a way to tell pact to verify a particular version of the provider against one version of the consumer? I saw the Consumer Version Selector page (https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors) but it does not take the version (tag, branch, environment are supported) and I don't see it accept consumerVersionSelectors params (i checked with mvn help:describe -DgroupId=au.com.dius.pact.provider -DartifactId=maven -Dversion=4.1.17 -Ddetail=true)uglyog
Thai Le
10/12/2022, 10:07 PMThai Le
10/13/2022, 10:26 PM@PactBrokerConsumerVersionSelectors
public static SelectorBuilder consumerVersionSelectors() {
return new SelectorBuilder()
.branch(System.getProperty("pact.consumer.branch"));
}
and acording to the doc, the LATEST version from a particular branch of each consumer will be selected. However when the provider test run with this selector, i see it validates against ALL versions from the given branch of each consumer:Thai Le
10/13/2022, 10:28 PMuglyog
Thai Le
10/14/2022, 1:58 PM