pactffi_mock_server_logs are empty, in 0.4.20 release.
Initially identified in pact-net's test suite when attempting to update to libpact_ffi 0.4.20. pact-net uses pactffi_log_to_buffer when it initialises, and has a test to check that pactffi_mock_server_logs actually returns logs (and it failed)
Cause
I believe this is due to a mis-match in the logging libraries in pact_models, compared to the rest of the pact rust estate
Added a test, which requires a buffer log sink. I believe the full test run sets a different global sink, so the test is ignored in the main run, and executed in isolation. It's not terribly pretty but it does the job.
pactffi_mock_server_logs are empty, in 0.4.20 release.
Initially identified in pact-net's test suite when attempting to update to libpact_ffi 0.4.20. pact-net uses pactffi_log_to_buffer when it initialises, and has a test to check that pactffi_mock_server_logs actually returns logs (and it failed)
Cause
I believe this is due to a mis-match in the logging libraries in
pact_models
, compared to the rest of the pact rust estatetracing-0.1.37
https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_models/Cargo.toml#L48tracing-subscriber-0.3.16
https://github.com/pact-foundation/pact-reference/blob/5699cab757e31875b74ea8ce98cd9821dc331421/rust/pact_models/Cargo.toml#L67C1-L67C93All other crates
Reproductions
Added a test, which requires a buffer log sink. I believe the full test run sets a different global sink, so the test is ignored in the main run, and executed in isolation. It's not terribly pretty but it does the job.
✅ tag
libpact_ffi-v0.4.19
❌ tag
libpact_ffi-v0.4.20
Resolution
Suggest
version="=x.y.z"
, note the=
sign in the version number. This forces pinned resolutionTesting
pact-plugin-driver
pact_mock_server
pact_reference