test(sns): Porting sns-testing to the ICP mono repo, Part III#4705
Merged
aterga merged 23 commits intodfinity:masterfrom Apr 17, 2025
Merged
test(sns): Porting sns-testing to the ICP mono repo, Part III#4705aterga merged 23 commits intodfinity:masterfrom
aterga merged 23 commits intodfinity:masterfrom
Conversation
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
aterga
commented
Apr 11, 2025
…anisters' 'is_canister_stopped' is currently used by PocketIc and ic-agent implementations. However, the 'CallCanisters' trait requires implementing this function. As a result, some trait implementations have dummy implementation for this method which panics in runtime. To avoid runtime panic, this method is extracted into a dedicated 'CallCanistersWithStoppedCanisterError' trait that inherits 'CallCanisters'. This trait is only implemented for PocketIc and ic-agent's. An attempt to use 'is_canister_stopped_error' for other implementation will cause compilation error instead of runtime panic.
Currently the ID of the NNS neuron that is used to submit proposals is hardcoded which is potentially error-prone. To fix this, 'sns-testing-init' and 'sns-testing run-basic scenario' were made to consider neuron ID instead of using the hardcoded ID from a separate crate.
Co-authored-by: Arshavir Ter-Gabrielyan <arshavir.ter.gabrielyan@dfinity.org>
Co-authored-by: Arshavir Ter-Gabrielyan <arshavir.ter.gabrielyan@dfinity.org>
Currently, IC network HTTP endpoint port launched by 'sns-testing-init' is hardcoded to 8080. This commit adds an additional command line option to 'sns-testing-init' binary to make the port configurable.
'run-basic-scenario' subcommand is updated to take the WASM module and Candid argument used for the canister upgrade as arguments instead of hardcoding them. This allows users to run this "basic scenario" on arbitrary canisters.
e034084 to
9e424e5
Compare
Currently, README requires running binaries using 'bazel run' which bloats usage instructions. Additionally, in the future, we'd like to distribute all these binaries without 'bazel'. This commit adds a bash script that builds all required binaries using 'bazel', copies them to the local directory and updates PATH. README now implies the usage of this script to populate PATH and explains how to use binaries without 'bazel run' wrapper (for all binaries except 'sns-testing-init').
Currently, 'sns-testing-init' requires specifying the path to the PocketIC directory explicitly. This introduces the necessity to clean up the directory before re-running this binary (if the same value for the option is used). This commit makes '--state-dir' argument optional. If it's not provided, a new temporary directory will be created. This directory will remain even after 'pocket-ic-server' process has finished. This temporary directory will be cleaned up on the next system reboot.
max-dfinity
reviewed
Apr 15, 2025
max-dfinity
reviewed
Apr 15, 2025
max-dfinity
reviewed
Apr 15, 2025
max-dfinity
approved these changes
Apr 15, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 17, 2025
This is a preliminary PR for discussing the changes that will be ported to #4697 Context: Serokell sns-testing milestone III --------- Co-authored-by: Roman Melnikov <roman.melnikov@serokell.io> Co-authored-by: Roman Melnikov <rvembox@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the third PR for implementing the next-gen sns-testing tool.
At the core of this tool lies the PocketIC framework, the testing framework capable of creating a fully deterministic environment for testing complex ICP dapp scenarios.
This PR is authored by Serokell and reviewed by the DFINITY Foundation.
< Previous PR |