Feisal Ahmad
12/11/2024, 2:54 PM/// Start a new plugin mock server (async version). This will send the start mock server request
/// to the plugin that provides the mock server.
pub async fn start_async(
pact: Box<dyn Pact + Send + Sync>,
output_path: Option<PathBuf>,
catalogue_entry: &CatalogueEntry
) -> anyhow::Result<Box<dyn ValidatingMockServer>> {
let test_context = hashmap!{};
let result = start_mock_server_v2(catalogue_entry, pact.boxed(), MockServerConfig {
output_path: output_path.clone(),
host_interface: None,
port: 0,
tls: false
}, test_context).await?;
Ok(Box::new(PluginMockServer {
mock_server_details: result,
pact: pact.boxed(),
output_path: output_path.clone(),
catalogue_entry: catalogue_entry.clone()
}))
}
It looks like the test_context isn’t hooked up yet to receive the value from the call to pactffi_create_mock_server_for_transport
?rholshausen
12/11/2024, 10:13 PMrholshausen
12/11/2024, 10:14 PMrholshausen
12/11/2024, 11:51 PMrholshausen
12/11/2024, 11:52 PMrholshausen
12/11/2024, 11:52 PMrholshausen
12/12/2024, 12:13 AMrholshausen
12/12/2024, 12:15 AMFeisal Ahmad
12/12/2024, 12:49 AMFeisal Ahmad
12/12/2024, 12:50 AMrholshausen
12/12/2024, 12:59 AMStartMockServerRequest
message to pass that data. That requires a change to that interface. I have written a proposal to fix some of the plugin interface problems, if you want to raise any issues you are having there? See https://github.com/pact-foundation/pact-plugins/blob/main/docs/proposals/001_V2_Plugin_Interface.mdrholshausen
12/12/2024, 1:00 AMtest_context
field, maybe under a transport_config
key?Feisal Ahmad
12/12/2024, 1:07 AMrholshausen
12/12/2024, 1:14 AMrholshausen
12/12/2024, 10:56 PMrholshausen
12/12/2024, 10:56 PMFeisal Ahmad
12/13/2024, 5:42 PMFeisal Ahmad
01/22/2025, 2:53 PM