Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Prev Previous commit
Next Next commit
update state rpc tests
  • Loading branch information
emostov committed Jun 17, 2021
commit 668832921e8b9e44eedf8f8ac6a65a94ed1e050f
8 changes: 8 additions & 0 deletions client/rpc/src/state/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fn should_return_storage() {
Arc::new(client),
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);
let key = StorageKey(KEY.to_vec());

Expand Down Expand Up @@ -105,6 +106,7 @@ fn should_return_child_storage() {
client,
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);
let child_key = prefixed_storage_key();
let key = StorageKey(b"key".to_vec());
Expand Down Expand Up @@ -144,6 +146,7 @@ fn should_call_contract() {
client,
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);

assert_matches!(
Expand All @@ -162,6 +165,7 @@ fn should_notify_about_storage_changes() {
client.clone(),
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);

api.subscribe_storage(Default::default(), subscriber, None.into());
Expand Down Expand Up @@ -200,6 +204,7 @@ fn should_send_initial_storage_changes_and_notifications() {
client.clone(),
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);

let alice_balance_key = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Alice.into()));
Expand Down Expand Up @@ -242,6 +247,7 @@ fn should_query_storage() {
client.clone(),
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);

let mut add_block = |nonce| {
Expand Down Expand Up @@ -463,6 +469,7 @@ fn should_return_runtime_version() {
client.clone(),
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);

let result = "{\"specName\":\"test\",\"implName\":\"parity-test\",\"authoringVersion\":1,\
Expand Down Expand Up @@ -490,6 +497,7 @@ fn should_notify_on_runtime_version_initially() {
client.clone(),
SubscriptionManager::new(Arc::new(TaskExecutor)),
DenyUnsafe::No,
None,
);

api.subscribe_runtime_version(Default::default(), subscriber);
Expand Down