-
Notifications
You must be signed in to change notification settings - Fork 53
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
Verify from Pact Broker fails with no useful information #98
Comments
FYI: I can pull down the pact file via a Postman GET |
Can I just check: your examples above reference http and https, is that just an oversight as you wrote up the issue? |
Correct - I have the whole lot as https. I copied the first snippet from from the pact documentation, will edit. |
Actually, I've just realised - where I have successfully download via Postman, I had read access username and password basic auth. Are there any options for this on the scala-pact CLI? |
Try this: Line 34 in cfc5aa8
|
OK I gave that a go and I get the same result. I copied the url from the console output and compared it with what I have in postman and they're exactly the same. Just for thoroughness I tried switching to our guest wifi and I now get a different error:
So I suspect the first fail was something to do with the corp network - although it allowed postman requests weirdly. Is there a way I can extend the default timeout of 2 seconds? |
Yes, sounds like we might be making some progress. You're literally the second person to report this problem and the first guy also submitted the PR with the test case I pointed you to. :-) Try this: There is, unfortunately, this issue which I discovered yesterday: That issuse shouldn't be the problem however, just a symptom of something else, 2 seconds to Scala-Pact might as well be two minutes. Assuming you're contract file isn't gigantic and you're network isn't really really poor, then a client timeout usually means that the details to your pact broker or to your running service are incorrect. Something to try! Use Postman or Curl to download the Pact file, and then do this to run the verification from a local source: If that works, then it's definitely something to do with your ability to connect to pact broker, if it doesn't work then the problem (or one of the problems) is that you're not setup to hit your service properly. Let me know how you get on! |
Thanks Dave, Using the I'm not going to burn more time on it for now as there's a simple solution - I download from Pact Broker to a local directory with another client as a pre-step to running pact. |
Hmmm.. I'll also take an action to look into this more carefully. I was satisfied that the committer had done the right thing the first time around (given that he'd fixed his own problem!) but I'll give it some more attention when I get a few minutes and see if I can replicate it at least. Glad to hear you have a work around for now though. |
Description:
I want to verify my provider against a pact on a remotely hosted Pact Broker (the Beta version provided by Pact). But I get a
Failed to load consumer pact from: <url>
message.There's nothing to help me understand why either in the consol or the logs. The Verification works fine against a local pact file.
Steps:
Added the following to my build.sbt
Have checked that all of my values are correct on the above and even tried adding it to a pact.sbt but got the same result.
Ran the following:
sbt "pact-verify --host localhost --port <port-number-of-running-service>"
Expectation:
If all is well a test result.
If all is not well, a useful error message that points to why it failed
Actual:
Sorry if I have missed anything obvious, but I didn't really know where to start with debugging this.
The text was updated successfully, but these errors were encountered: