diff --git a/testing/integration-tests/src/full_client/frame/staking.rs b/testing/integration-tests/src/full_client/frame/staking.rs index 9cd3b97441..7d285faa8a 100644 --- a/testing/integration-tests/src/full_client/frame/staking.rs +++ b/testing/integration-tests/src/full_client/frame/staking.rs @@ -35,18 +35,18 @@ fn default_validator_prefs() -> ValidatorPrefs { } #[tokio::test] -async fn validate_with_controller_account() { +async fn validate_with_stash_account() { let ctx = test_context().await; let api = ctx.client(); - let alice = dev::alice(); + let alice_stash = get_from_seed("Alice//stash"); let tx = node_runtime::tx() .staking() .validate(default_validator_prefs()); api.tx() - .sign_and_submit_then_watch_default(&tx, &alice) + .sign_and_submit_then_watch_default(&tx, &alice_stash) .await .unwrap() .wait_for_finalized_success() @@ -55,11 +55,11 @@ async fn validate_with_controller_account() { } #[tokio::test] -async fn validate_not_possible_for_stash_account() -> Result<(), Error> { +async fn validate_not_possible_for_controller_account() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); - let alice_stash = get_from_seed("Alice//stash"); + let alice = dev::alice(); let tx = node_runtime::tx() .staking() @@ -67,7 +67,7 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error> { let announce_validator = api .tx() - .sign_and_submit_then_watch_default(&tx, &alice_stash) + .sign_and_submit_then_watch_default(&tx, &alice) .await? .wait_for_finalized_success() .await; @@ -80,11 +80,11 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error> { } #[tokio::test] -async fn nominate_with_controller_account() { +async fn nominate_with_stash_account() { let ctx = test_context().await; let api = ctx.client(); - let alice = dev::alice(); + let alice_stash = get_from_seed("Alice//stash"); let bob = dev::bob(); let tx = node_runtime::tx() @@ -92,7 +92,7 @@ async fn nominate_with_controller_account() { .nominate(vec![bob.public_key().to_address()]); api.tx() - .sign_and_submit_then_watch_default(&tx, &alice) + .sign_and_submit_then_watch_default(&tx, &alice_stash) .await .unwrap() .wait_for_finalized_success() @@ -101,11 +101,11 @@ async fn nominate_with_controller_account() { } #[tokio::test] -async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { +async fn nominate_not_possible_for_controller_account() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); - let alice_stash = get_from_seed("Alice//stash"); + let alice = dev::alice(); let bob = dev::bob(); let tx = node_runtime::tx() @@ -114,7 +114,7 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { let nomination = api .tx() - .sign_and_submit_then_watch_default(&tx, &alice_stash) + .sign_and_submit_then_watch_default(&tx, &alice) .await .unwrap() .wait_for_finalized_success() @@ -129,7 +129,7 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { } #[tokio::test] -async fn chill_works_for_controller_only() -> Result<(), Error> { +async fn chill_works_for_stash_only() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); @@ -142,14 +142,14 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .staking() .nominate(vec![bob_stash.public_key().to_address()]); api.tx() - .sign_and_submit_then_watch_default(&nominate_tx, &alice) + .sign_and_submit_then_watch_default(&nominate_tx, &alice_stash) .await? .wait_for_finalized_success() .await?; let ledger_addr = node_runtime::storage() .staking() - .ledger(alice.public_key().to_account_id()); + .ledger(alice_stash.public_key().to_account_id()); let ledger = api .storage() .at_latest() @@ -163,7 +163,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { let chill = api .tx() - .sign_and_submit_then_watch_default(&chill_tx, &alice_stash) + .sign_and_submit_then_watch_default(&chill_tx, &alice) .await? .wait_for_finalized_success() .await; @@ -176,7 +176,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { let is_chilled = api .tx() - .sign_and_submit_then_watch_default(&chill_tx, &alice) + .sign_and_submit_then_watch_default(&chill_tx, &alice_stash) .await? .wait_for_finalized_success() .await?