Matt Yao
02/06/2023, 6:36 AMError making request to https://{PACTFLOW_HOST} status=400 {"errors":{"verificationResults.success":["success is missing"],"verificationResults.content":["content is missing"],"verificationResults.contentType":["contentType is missing"]}}
. So obviously, some of the params are mandatory that I missed, but the doc didn't clearly say which ones are and I am trying to figure it out.
The followings are the references and the examples I am following, with my scriptsMatt (pactflow.io / pact-js / pact-go)
✗ pactflow publish-provider-contract
No value provided for required options '--provider', '--provider-app-version'
Should presumably list a bunch more items. There might be a good reason why the CLI doesn’t do that, I know it works within the framework of thor (the gem).Matt (pactflow.io / pact-js / pact-go)
[--verification-success], [--no-verification-success] # Whether or not the self verification passed successfully.
[--verification-exit-code=N] # The exit code of the verification process. Can be used instead of --verification-success|--no-verification-success for a simpler build script.
Matt (pactflow.io / pact-js / pact-go)
[--verification-results=VERIFICATION_RESULTS] # The path to the file containing the output from the verification process
[--verification-results-content-type=VERIFICATION_RESULTS_CONTENT_TYPE] # The content type of the verification output eg. text/plain, application/yaml
[--verification-results-format=VERIFICATION_RESULTS_FORMAT] # The format of the verification output eg. junit, text
[--verifier=VERIFIER] # The tool used to verify the provider contract
Matt Yao
02/06/2023, 7:45 AMMatt Yao
02/06/2023, 9:55 AMverification-results-content
that I can't find from the doc. What's the expected value?Yousaf Nabi (pactflow.io)
--verfication-results
which is the path to the file, that contains the content. The CLI tool will read in the file, and send that as the content
Yousaf Nabi (pactflow.io)
Matt Yao
02/07/2023, 1:18 AMMatt (pactflow.io / pact-js / pact-go)
text/plain
or application/html
Matt Yao
02/07/2023, 4:54 AM--verification-results
file? I'd like to see if I can skip it and just put some dummy text to pass my pipeline testMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
echo 'generated by <program/process>' > results.txt
The set the flags:
--verification-results=results.txt \
--verification-results-content-type=text/plain \
--verification-success \
--verifier=<program/process>
[3:07 PM] The point of the verification results is to provide traceability to future team members to understand what level of confidence they should have in the contract itself.
Given you’re just testing for now, anything is fine.
There is no format for the results, it’s the output file from the process that does the verifying, and what makes sense to a user later on. I believe we render various content types in the PactFlow UI (e.g. Markdown) also.Yousaf Nabi (pactflow.io)
Matt Yao
02/07/2023, 10:48 PMMatt Yao
02/07/2023, 11:54 PM