Skip to content

refactor: move decode_registry_value into shared pocket_ic_helpers#9334

Draft
jasonz-dfinity wants to merge 1 commit intojason/migrate-create-subnet-test-to-state-machinefrom
jason/shared-decode-registry-value
Draft

refactor: move decode_registry_value into shared pocket_ic_helpers#9334
jasonz-dfinity wants to merge 1 commit intojason/migrate-create-subnet-test-to-state-machinefrom
jason/shared-decode-registry-value

Conversation

@jasonz-dfinity
Copy link
Contributor

Why

Multiple registry canister tests repeat the same boilerplate: call get_value, match on Content::Value, then prost::Message::decode. This is verbose (especially the fully-qualified Content path in swap_node_in_subnet_directly.rs) and duplicated across test files.

What

Move the generic decode_registry_value<T: Message + Default> helper from create_subnet.rs into the shared ic_nervous_system_integration_tests::pocket_ic_helpers::nns::registry module, and update both create_subnet.rs and swap_node_in_subnet_directly.rs to use it.

PR Chain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant