diff --git a/client/tests/integration/permissions/runtime_validators.rs b/client/tests/integration/permissions/runtime_validators.rs index ef449d7b615..3ba99979881 100644 --- a/client/tests/integration/permissions/runtime_validators.rs +++ b/client/tests/integration/permissions/runtime_validators.rs @@ -8,13 +8,10 @@ use iroha_data_model::{ prelude::*, transaction::WasmSmartContract, }; +use iroha_logger::info; use test_network::*; #[test] -// TODO: Maybe activate with a feature, -// which will be enabled in the build-script when `nightly` is enabled? -// Same for `mint_nft_for_every_use_every_1_sec()` test. -#[ignore = "Only on nightly"] fn deny_new_validators() -> Result<()> { let (_rt, _peer, test_client) = ::new().start_with_runtime(); wait_for_genesis_committed(&vec![test_client.clone()], 0); @@ -23,10 +20,10 @@ fn deny_new_validators() -> Result<()> { env!("OUT_DIR"), "/wasm32-unknown-unknown/release/deny_new_validators_validator.wasm" ); - println!("Reading wasm from {filename}"); + info!("Reading wasm from {filename}"); let wasm = fs::read(filename).wrap_err("Can't read smartcontract")?; - println!("wasm size is {} bytes", wasm.len()); + info!("wasm size is {} bytes", wasm.len()); let validator = Validator::new( "deny_new_validators%alice@wonderland".parse().unwrap(), @@ -35,6 +32,7 @@ fn deny_new_validators() -> Result<()> { raw_data: wasm.clone(), }, ); + info!("Submitting registration of the validator (should pass)"); test_client.submit_blocking(RegisterBox::new(validator))?; // Trying to register the validator again @@ -43,10 +41,13 @@ fn deny_new_validators() -> Result<()> { validator::Type::Instruction, WasmSmartContract { raw_data: wasm }, ); - let error_mes = test_client + info!("Submitting registration of a new validator (should fail)"); + let error = test_client .submit_blocking(RegisterBox::new(validator_2)) - .expect_err("Registration of a new validator should be denied") - .to_string(); - assert!(error_mes.contains("New validators are not allowed")); + .expect_err("Registration of a new validator should be denied"); + info!(?error); + assert!(error + .chain() + .any(|err| err.to_string().contains("New validators are not allowed"))); Ok(()) }