Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verifier CLI: documentation lacks detail #418

Closed
mjpieters opened this issue May 15, 2024 · 2 comments
Closed

Verifier CLI: documentation lacks detail #418

mjpieters opened this issue May 15, 2024 · 2 comments
Labels
documentation Indicates a need for improvements or additions to documentation

Comments

@mjpieters
Copy link
Contributor

mjpieters commented May 15, 2024

I find myself referring to the verifier source code to figure out what the different CLI options do:

  • There is no spec for what the --state-change-url will send. You can find the answer in the pact_verifier source code, but this should really be more easily accessible in the documentation itself.
  • It isn't immediately clear what form --state-change-url needs to take. Is it the full URL, or can you use a relative path? If the latter, will --base-path be honoured? (the source code is harder to follow here, but it looks like the URL needs to be absolute).
  • It is unclear what path on the provider would be used to POST asynchronous messages to for testing. Is this the --base-path perhaps? If so, that would make it very hard to test both async message contracts and HTTP request-response contracts in the same verification session if a provider already has a API root POST endpoint used for other purposes.

Perhaps a more fully-featured example, including a sample could be provided?

@mjpieters mjpieters changed the title Verifier cli documentation lacks detail Verifier CLI: documentation lacks detail May 17, 2024
@rholshausen rholshausen added the documentation Indicates a need for improvements or additions to documentation label Jul 8, 2024
@rholshausen
Copy link
Contributor

There is no spec for what the --state-change-url will send. You can find the answer in the pact_verifier source code, but this should really be more easily accessible in the documentation itself.

Updated the README for this.

It isn't immediately clear what form --state-change-url needs to take. Is it the full URL, or can you use a relative path? If the latter, will --base-path be honoured? (the source code is harder to follow here, but it looks like the URL needs to be absolute).

It is an absolute path. Updated the README.

It is unclear what path on the provider would be used to POST asynchronous messages to for testing. Is this the --base-path perhaps? If so, that would make it very hard to test both async message contracts and HTTP request-response contracts in the same verification session if a provider already has a API root POST endpoint used for other purposes.

If both HTTP and message interactions are defined in the same Pact, the verifications for these can be configured using the --transports <transports> option. For example, --transports http:8080 message:8081 will send HTTP requests to port 8080 and message requests to port 8081. I'll update the README to document this.

@YOU54F
Copy link
Member

YOU54F commented Sep 9, 2024

Thanks for taking the time to raise these issues, and other updates to the pact cli experience. I believe they are all resolved now.

Perhaps a more fully-featured example, including a sample could be provided?

We have a couple of examples here over in the pact-plugin project

If you want to suggest a particular example or use case that you would like to see an example for, please do so in a new issue.

Also if you have any further enhancements, please feel free to propose 👍🏾

@YOU54F YOU54F closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Indicates a need for improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants