Skip to content

Commit

Permalink
add: cover test for role transfer
Browse files Browse the repository at this point in the history
Signed-off-by: Lohachov Mykhailo <[email protected]>
  • Loading branch information
aoyako committed Feb 10, 2025
1 parent a523504 commit 29e9f2c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crates/iroha/tests/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,16 @@ fn grant_revoke_role_permissions() -> Result<()> {

Ok(())
}

#[test]
#[should_panic(expected = "a peer exited unexpectedly")]
fn grant_unexisting_role_in_genesis_fail() {
// Grant Alice UNEXISTING role
let alice_id = ALICE_ID.clone();
let role_id = "UNEXISTING".parse::<RoleId>().unwrap();
let grant_genesis_role = Grant::account_role(role_id, alice_id);

let _result = NetworkBuilder::new()
.with_genesis_instruction(grant_genesis_role)
.start_blocking();
}

0 comments on commit 29e9f2c

Please sign in to comment.