-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(sns): Add integration test for setting custom proposal topics #4170
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this pull request affects the behavior of any canister owned by
the Governance team, remember to update the corresponding
unreleased_changes.md file(s).
To acknowldge this reminder (and unblock the PR), dismiss this
code review by going to the bottom of the pull request page, and
supply one of the following reasons:
-
Done.
-
No canister behavior changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you just forgot to rebase|merge this -> I only looked at files in the integration_tests dir. If that's all there is to look at here, no need to ask me for further review. Otherwise, please lmk what other changes are "actually" part of this PR.
..initial_function.clone() | ||
}; | ||
|
||
// AddGenericNervousSystemFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this comment can and should contain prose, since that is the standard way.
.await | ||
.unwrap(); | ||
|
||
let proposal_id = SubmittedProposal::try_from(response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused why conversion is needed...
.unwrap(); | ||
} | ||
|
||
// SetCustomProposalTopics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prose?
Also, this is where we run the code under test, right?
url: DUMMY_URL_FOR_PROPOSALS.to_string(), | ||
action: Some(Action::SetCustomProposalTopics(SetCustomProposalTopics { | ||
custom_function_id_to_topic: btreemap! { | ||
1111_u64 => Topic::ApplicationBusinessLogic, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think _u64
prefix is not needed? Doesn't seem useful, but up to you.
This PR introduces a new type of SNS proposals, `SetCustomProposalTopics`, which can be used to batch-set topics for all custom proposals (or any non-empty subset thereof) at once. | [Next PR](#4170) >
This PR adds an integration test for the scenario in which the topic is changed for a custom SNS proposal type.
< Previous PR |