Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Run all tests with try-runtime feature enabled #14396

Merged
merged 3 commits into from
Jun 16, 2023
Merged

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Jun 15, 2023

There are some tests that are guarded behind the try-runtime feature which are currently not being executed. This pull requests changes this and enables the feature for the test run.

There are some tests that are guarded behind the `try-runtime` feature which are currently not being
executed. This pull requests changes this and enables the feature for the test run.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jun 15, 2023
@bkchr bkchr requested review from a team June 15, 2023 18:36
@bkchr bkchr requested a review from athei as a code owner June 15, 2023 18:36
@bkchr bkchr requested a review from a team June 15, 2023 18:36
@bkchr bkchr requested a review from a team as a code owner June 15, 2023 18:36
@ggwpez ggwpez requested a review from pgherveou June 15, 2023 20:18
Comment on lines 194 to 198
///
/// If `RUN_ALL_STEPS == true` and `try-runtime` is enabled, this will run all the migrations inside
/// `on_runtime_upgrade`. This should be set to false in tests that want to ensure the step by step
/// migration works.
pub struct Migration<T: Config, const RUN_ALL_STEPS: bool = true>(PhantomData<T>);
Copy link
Contributor

@pgherveou pgherveou Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: do we also run the tests in CI without try_runtime? in which case I think it would be fine to just disable the tests using this struct and not add this extra RUN_ALL_STEPS

If not, maybe we change the name to TRY_ALL_STEPS or TEST_ALL_STEPS to make it clear that this is just intended for testing purpose.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the changes of the pr, we run all tests with try-runtime.

@paritytech-ci paritytech-ci requested a review from a team June 16, 2023 09:18
@bkchr bkchr merged commit c101b13 into master Jun 16, 2023
@bkchr bkchr deleted the bkchr-ci-run-try-runtime branch June 16, 2023 10:16
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
* Run all tests with `try-runtime` feature enabled

There are some tests that are guarded behind the `try-runtime` feature which are currently not being
executed. This pull requests changes this and enables the feature for the test run.

* Add some docs

* Rename variable
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants