From 3021134f6a62bf902a5989cbb626d307918b63e1 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Mon, 17 Jan 2022 11:47:33 +0300 Subject: [PATCH] Disabled some tests for the disabled functionality --- rust/src/tx_builder.rs | 52 +++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/rust/src/tx_builder.rs b/rust/src/tx_builder.rs index f39dd4bd..aeabf213 100644 --- a/rust/src/tx_builder.rs +++ b/rust/src/tx_builder.rs @@ -3654,30 +3654,34 @@ mod tests { let est2 = tx_builder.min_fee(); assert!(est2.is_ok()); - // Remove one mint script - tx_builder.mint_scripts = - Some(NativeScripts::from(vec![tx_builder.mint_scripts.unwrap().get(1)])); - - // Now two different policies are minted but only one witness script is present - let est3 = tx_builder.min_fee(); - assert!(est3.is_err()); - assert!(est3.err().unwrap().to_string().contains(&format!("{:?}", hex::encode(policy_id1.to_bytes())))); - - // Remove all mint scripts - tx_builder.mint_scripts = Some(NativeScripts::new()); - - // Mint exists but no witness scripts at all present - let est4 = tx_builder.min_fee(); - assert!(est4.is_err()); - assert!(est4.err().unwrap().to_string().contains("witness scripts are not provided")); - - // Remove all mint scripts - tx_builder.mint_scripts = None; - - // Mint exists but no witness scripts at all present - let est5 = tx_builder.min_fee(); - assert!(est5.is_err()); - assert!(est5.err().unwrap().to_string().contains("witness scripts are not provided")); + // Native script assertion has been commented out in `.min_fee` + // Until implemented in a more performant manner + // TODO: these test parts might be returned back when it's done + + // // Remove one mint script + // tx_builder.mint_scripts = + // Some(NativeScripts::from(vec![tx_builder.mint_scripts.unwrap().get(1)])); + // + // // Now two different policies are minted but only one witness script is present + // let est3 = tx_builder.min_fee(); + // assert!(est3.is_err()); + // assert!(est3.err().unwrap().to_string().contains(&format!("{:?}", hex::encode(policy_id1.to_bytes())))); + // + // // Remove all mint scripts + // tx_builder.mint_scripts = Some(NativeScripts::new()); + // + // // Mint exists but no witness scripts at all present + // let est4 = tx_builder.min_fee(); + // assert!(est4.is_err()); + // assert!(est4.err().unwrap().to_string().contains("witness scripts are not provided")); + // + // // Remove all mint scripts + // tx_builder.mint_scripts = None; + // + // // Mint exists but no witness scripts at all present + // let est5 = tx_builder.min_fee(); + // assert!(est5.is_err()); + // assert!(est5.err().unwrap().to_string().contains("witness scripts are not provided")); } #[test]