Allow relative paths in pact publish task
See original GitHub issueCurrently, when passing pactUrls
to the publish task, the urls need to be absolute. It would be nice to pass in a relative path.
See https://github.com/pact-foundation/pact-js/issues/31 + https://github.com/pact-foundation/pact-node/commit/a5afdb17e2c3ca8acf6c6a2051e7575cc4bcb4b2#commitcomment-21360868 for background.
I suspect part of the complication is relativity to the underlying Ruby process, so we would need to convert to an absolute path under the hood anyway.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Allow relative paths in pact publish task · Issue #33 - GitHub
Currently, when passing pactUrls to the publish task, the urls need to be absolute. It would be nice to pass in a relative...
Read more >Pact Maven plugin | Pact Docs
This is a Maven plugin for verifying pacts against a running provider, publishing pacts generated by consumer tests,
Read more >Untitled
The Gradle plugin creates a task `pactVerify` to your build which will verify all configured pacts against your provider. ## To Use It...
Read more >Using pact broker with a path - Stack Overflow
When I enable PreEmptive Authentication i can see that ot give a Warning like [WARNING] Using preemptive basic authentication with the pact ......
Read more >“How-to” Guides - Spring Cloud
Flow: Consumer Contract approach with Pact Broker | Consumer Side; 7.8. ... We are working on allowing more ways of describing the contracts....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The paths need to be relative to the directory you run the executable from - that might have been the issue. So you need to invoke the verifier using the relative path from the project root if possible.
Btw, there’s an issue to change the paths from options to space separated arguments, so we don’t have to do the comma separating thing.
@mefellows I’m looking into this one and thinking of adding something in the pact-util file that checks for paths/urls and then normalizes/resolves them if they’re valid.
Currently though, we’re a bit “laissez-faire” with the path validation as we do some minute checks on it, but nothing too concrete. I do agree that we need to have the ability to check relative vs absolute paths, however, should we also accept path shortcuts like
~/
?Also, when it comes to URLs, should we accept any protocols, or is it locked down to http(s)?
Trying to figure out the best way to do this as to implement it properly.