Gustavo Souza
03/02/2023, 6:11 PMPact contract publishing failed: Error: Pact publication failed with non-zero exit code. Full output was:
<internal:gem_prelude>:4:in `require': cannot load such file -- rubygems.rb (LoadError)
from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
what i did:
• created a publish.js
• run the publish.js to publish the pacts into pactflowMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Slackbot
03/02/2023, 8:56 PMGustavo Souza
03/02/2023, 10:19 PMpact-broker publish pacts/ --consumer-app-version 1.0.0 --branch main --broker-base-url=<URL> --broker-token=<TOKEN>
to use this i need to install the pact-broker?Matt (pactflow.io / pact-js / pact-go)
c:\. There is a 255 character limit in path names, and you’re chewing up a bunch there 😉Gustavo Souza
03/03/2023, 1:56 PMpublish.js point to pacts folder right? so the pactFilesOrDirs will be long as well...
for example, my plan is to run locally and also at github actions and to do it manage the path will be kind confusing to other members of my team!
i didn't find an option to use pact-broker in the docs, i mean, there is no setup to use it...Gustavo Souza
03/03/2023, 1:57 PMGustavo Souza
03/03/2023, 2:18 PMMatt (pactflow.io / pact-js / pact-go)
but i don’t think is a good approach, because theit’s not the file path of the pacts to publish, it’s actually an underlying Ruby library that exceeds the length.point to pacts folder right? so the pactFilesOrDirs will be long as well...publish.js
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
I can run a provider without a broker, correct? how can i do it? i have to grab the files from pacts folder?!Yes you can. If you’re talking about provider verification without a broker, you would specify the URL to a pact file in the verification process, instead of the broker.
also i have this option >> https://hub.docker.com/r/pactfoundation/pact-clito do what sorry - publish pacts? Yes You seem to be a little confused by some of the concepts here. I really recommend you run some of the workshops and come back once you’ve done that.
Gustavo Souza
03/07/2023, 6:22 PMimport { Verifier } from '@pact-foundation/pact';
describe('Pact Verification', () => {
jest.setTimeout(50000);
test('validates the expectations of Matching Service', () => {
return new Verifier({
providerBaseUrl:
'providerBaseUrl',
publishVerificationResult: true,
providerVersion: '2.0.0',
})
.verifyProvider()
.then((output) => {
console.log('Pact Verification Complete!');
console.log(output);
});
});
});
resultGustavo Souza
03/07/2023, 6:22 PMGustavo Souza
03/07/2023, 6:25 PMproviderBaseUrl means Running API provider host endpoint.
it means that i can use this API resource from pactflow?Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Matt (pactflow.io / pact-js / pact-go)
also the result at pactflowthat result is “unverified” - this means the verification either didn’t run properly, didn’t publish or both
Gustavo Souza
03/08/2023, 12:50 PMGustavo Souza
03/08/2023, 1:05 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)