~Hiya! Does anyone have any tips for debugging `--...
# pact-ruby-standalone
g
Hiya! Does anyone have any tips for debugging
--publish-verification-results
in
pact-provider-verifier
? I think I’ve included all the necessary arguments, but it isn’t publishing and the log output doesn’t suggest it’s trying to.
I’d expect it either to publish or tell me why it couldn’t, but I’m not familiar enough with Ruby to know quite what should be happening. OMG ignore me it’s because the consumer still uses
master
as its default branch 🙄
The command I’m running is:
Copy code
./pact/bin/pact-provider-verifier \
--broker-username ${PACT_BROKER_USER} \
--broker-password ${PACT_BROKER_PASS} \
--provider-app-version ${GIT_COMMIT_PROVIDER} \
--provider-base-url ${APP_BASE_URL} \
--provider-version-tag ${CIRCLE_BRANCH} \
--pact-broker-base-url ${PACT_BROKER_BASE_URL} \
--provider ${PACT_PROVIDER} \
--consumer-version-tag main \
--wait 30 \
--verbose \
--publish-verification-results
And the verbose log output is:
Copy code
opening connection to <my-broker>:443...
opened
starting SSL for <my-broker>:443...
SSL established
<- "GET / HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: application/hal+json\r\nUser-Agent: Ruby\r\nAuthorization: [redacted]\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Date: Mon, 21 Feb 2022 10:11:33 GMT\r\n"
-> "Content-Type: application/hal+json;charset=utf-8\r\n"
-> "Content-Length: 5112\r\n"
-> "Connection: keep-alive\r\n"
-> "Vary: Accept\r\n"
-> "Server: Webmachine-Ruby/1.6.0 Rack/1.3\r\n"
-> "X-Pact-Broker-Version: 2.93.2\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
-> "\r\n"
reading 5112 bytes...
-> <removed>
read 5112 bytes
Conn keep-alive
INFO: Fetching pacts for lpa-codes from https://<my-broker> with the selection criteria: : latest for tag main
opening connection to <my-broker>:443...
opened
starting SSL for <my-broker>:443...
SSL established
<- "POST /pacts/provider/lpa-codes/for-verification HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: application/hal+json\r\nUser-Agent: Ruby\r\nContent-Type: application/json\r\nAuthorization: [redacted]\r\n"
<- "{\"consumerVersionSelectors\":[{\"tag\":\"main\",\"latest\":true}],\"providerVersionTags\":[\"pact-verify\"]}"
-> "HTTP/1.1 200 OK\r\n"
-> "Date: Mon, 21 Feb 2022 10:11:33 GMT\r\n"
-> "Content-Type: application/hal+json;charset=utf-8\r\n"
-> "Content-Length: 179\r\n"
-> "Connection: keep-alive\r\n"
-> "Vary: Accept\r\n"
-> "Server: Webmachine-Ruby/1.6.0 Rack/1.3\r\n"
-> "X-Pact-Broker-Version: 2.93.2\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
-> "\r\n"
reading 179 bytes...
-> "{\"_embedded\":{\"pacts\":[]},\"_links\":{\"self\":{\"href\":\"https://<my-broker>/pacts/provider/lpa-codes/for-verification\",\"title\":\"Pacts to be verified\"}}}"
read 179 bytes
Conn keep-alive
INFO: Polling for up to 30 seconds for provider to become available at localhost:4343...
INFO: Provider available, proceeding with verifications
Resolved, the
consumer-version-tag
should have been “master” not “main”. This is what happens when you have a branch naming strategy but don’t actually roll it across your estate 😂
😆 1