This message was deleted.
# pactflow
s
This message was deleted.
y
consumer_version_selectors [{tag: "message", latest: true}, {mainBranch: true}]
, however it doesnt like it.
What error are your receiving?
As of October 2021, this is not yet supported in all Pact client libraries.
what do you currently recommend for this case? Please suggest, documentation is not clear what to use correctly
What client library, and what version are you using?
d
this is i found from
Gemfile.lock
pact (1.63.0),  pact_broker-client (1.51.1)
which version we supposed to use?
Good to know what’s causing the issue
y
What is the error Dilip, we are unable to help you otherwise
d
We have added this line for the pact helper file
consumer_version_selectors [{tag: "message", latest: true}, {mainBranch: true}]
only difference was added
mainBranch:true
since we want to test against consumer main branch, right now it is verifying all the consumer opened branches instead
main
branch
error:
(Pact::UnrecognizePactFormatError)
I would like if the syntax is correct to use
consumer_version_selectors [{tag: "message", latest: true}, {mainBranch: true}]
Trying to run the consumer verification for the
tag:message
against consumer
main
branch only. Looks like
tag:message
is not working anymore and now all the tests running against
main
including
tag:REST
after i added the
{mainBranch:true}
. Wondering if the syntax was wrong?
y
The syntax looks okay to me https://github.com/pact-foundation/pact-ruby/blob/fc35041f55e887a2a6d040af31efe869[…]50/spec/lib/pact/pact_broker/pact_selection_description_spec.rb You are using pact-ruby 1.63.0 which is one version from the latest and supports consumer version selectors You can test them directly against your browser, via the HAL browser, or API passing in the consumer version selectors, to see if that returns what you expect
d
Looks like it is somehow not using the tag: message when I gave the main branch:true
Is there anyway I can configure for tag and run that tag against main branch?
Some of our main branch also called ‘master’ , wondering if we give main branch:true, it will look the branch name value as main only? Some of our consumer main branch value is master. Wondering how can we separate them to run one for master and others are from main?
m
The main branch is specific to each application. In application A the main branch might be
main
and for B it might be
master
. See https://docs.pact.io/pact_broker/branches#pacticipant-main-branch-property for more on that
(Pact::UnrecognizePactFormatError)
this error makes me think the selectors are working, but is pulling in contracts that the Ruby application cannot verify. Ruby can only verify 2.0 specification contracts, with the caveat that it can do basic “pact message” testing