Skip to content

Commit

Permalink
feat: Apply generators to message's metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
tienvx committed Nov 20, 2023
1 parent b57a717 commit b915c29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/pact_ffi/src/models/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,13 @@ ffi_fn! {
/// If no further data is present, returns NULL.
fn pactffi_message_metadata_iter_next(iter: *mut MessageMetadataIterator) -> *mut MessageMetadataPair {
let iter = as_mut!(iter);
let generated_metadata;

let metadata = match iter.message {
Either::Left(message) => {
let message = as_ref!(message);
&message.metadata
generated_metadata = block_on(generate_message(message, &GeneratorTestMode::Consumer, &hashmap!{}, &vec![], &hashmap!{})).metadata;
&generated_metadata
}
Either::Right(contents) => {
let contents = as_ref!(contents);
Expand Down

0 comments on commit b915c29

Please sign in to comment.