-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Expectation failures should be reported on all pact URLs, not just on the first one #88
Comments
I can't tell if this is a problem with the go streams, or the ruby streams. Will investigate when I get a chance. |
I can't see any difference between the first and second in the ruby verifier - the json output goes to stdout both times, and only the warnings are shown in stderr. Let me know if you find anything different @mefellows |
@bethesque you may want to try with I can see the first pact output going to stdout, the second to stderr:
|
Hm. This has turned out to be trickier than I expected. I've recreated it, I've just got to work out the best way to fix it. |
Ok, I've fixed this, but I'm not entirely sure I've solved it the best way. The way the pacts are being passed into the verifier one at a time, so we get a separate JSON document for each pact. This means that the stdout cannot be JSON parsed directly, but needs to be split at the joins If I pass all the pacts in together, then there will just be one overall JSON results document. That would seem to be a better solution. However, there is an outstanding request to send the results for each pact to a separate file, so for that, I'd need to pass the pacts in separately (as they currently are), and give each a unique file path to write the JSON results to. I'm in a dilemma! Perhaps I'll need to add an option to allow either verifying them separately, or as a group. |
@bethesque I think this approach (JSONS) is quite acceptable. I would only recommend using a new line in between JSON objects to turn it into JSONL. It is much easier to parse by using line-reading streams, which are available in pretty much every language. Of course, in either case the client, e.g. pact-go would need to change to split the JSON objects first. |
Hm. That could work. I'd need to make a modification somewhere to add the new line in, but that shouldn't be too hard. |
Thanks @bethesque , I can take a look at fixing this in Pact Go tomorrow. Just to re-cap, you've fixed the verifier so that all results come back in JSON without the line separator. Should I wait for the JSONL implementation before updating? |
This allows the stream to be parsed as jsonl Fixes: pact-foundation/pact-go#88
Done. Each JSON document is now separated by a new line as per jsonl. Please use 1.52.0 of the standalone. |
Boom 💥
I'll get onto this today, thanks Beth.
…On Fri, Jul 13, 2018 at 9:08 AM, Beth Skurrie ***@***.***> wrote:
Done. Each JSON document is now separated by a new line as per jsonl.
Please use 1.52.0 of the standalone.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#88 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADSjPST9zl7eTFvHWee2jsGi4POuVQBks5uF9b5gaJpZM4UxYHG>
.
--
Matt Fellows
- http://www.onegeek.com.au/
|
@bethesque, @mefellows thanks a lot for the quick turnaround. The responsiveness of your team is amazing. |
No worries @alexeits - we ❤️ it! |
Latest release is out @alexeits - tag is Let us know how you go! |
I got results for both pacts after the upgrade. It works! Thank you very much! |
Excellent! 👍
…On Sat, Jul 14, 2018, 3:37 AM Alex Tsibulya ***@***.***> wrote:
I got results for both pacts after the upgrade. It works! Thank you very
much!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#88 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADSjFHVMpCtIglgXCsXD7aR4G8aGa8Dks5uGNrrgaJpZM4UxYHG>
.
|
Software versions
OS: macOS High Sierra 10.13.5
Consumer Pact library: Pact Go CLI v1.0.0-beta.1, using CLI tools version 1.44.1
Provider Pact library:
Golang Version:
go version go1.10.1 darwin/amd64
Golang environment:
Expected behaviour
Actual behaviour
It the first pact succeeds expectation failures on all subsequent pacts are ignored
Steps to reproduce
Relevant log files
Running pacts by hand with
pact-provider-verifier
shows that the result for the first pact URL go tostdout
:while failures for the second pact URL go to
stderr
:It appears that
stderr
is ignored by the client.go, only stdout is processedThe text was updated successfully, but these errors were encountered: