-
Notifications
You must be signed in to change notification settings - Fork 46
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
pactffi_pact_handle_write_file when used with plugins does not write 'transport' key to pact #458
Comments
From the perspective of the FFI, I would first question whether we need to both function at all? Or should we deprecate one in favour of the other? Having said that, if we do decide to keep both, I agree they should probably produce the same result. Do you know which one is the more correct output? I'm guessing that |
I hadn't seen I think it might be because its a message pact handle I get back from `pact_ffi_write_pact looks correct to me (in the fact the transport key is written which allows plugins to be used on the verification side) I don't think |
Yeah, this definitely seems to link with #440. From the recent work in Pact Python, I can confirm that it is possible to use message interactions without using |
Found the root cause of the problem.
|
Expected - Calling
pactffi_pact_handle_write_file
will result in the same pact file aspactffi_write_file
Actual - Calling
pactffi_pact_handle_write_file
will result in a pact file, with a missingtransport
key in the plugin interactionReproducer - master...YOU54F:pact-reference:bug/pactffi_pact_handle_write_file_no_transport
The test skips sending a consumer request, and checking mismatches, and simply aims to serialise the file after starting the mock server. Sending a valid consumer request does not change the outcome
Uncomment
pactffi_pact_handle_write_file
and comment outpactffi_write_pact_file
linw to see an errorrelevant code
pact_ffi_write_pact
pact_mock_server::write_pact_file
pact_handle_write_pact_file
use pact_models::pact::{ReadWritePact, write_pact};
The text was updated successfully, but these errors were encountered: