Skip to content
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

Add zombie upgrade tests containers #560

Merged
merged 10 commits into from
Jun 5, 2024

Conversation

girazoki
Copy link
Collaborator

@girazoki girazoki commented May 24, 2024

Adds new tests for zombienet upgrades in container-chains. This should extend our toolset and that of the container-chains to test the runtime upgrades. These are triggered by the CI but also can be triggered as:

  • from the tests folder, running pnpm moonwall test zombie_frontier_template_upgrade
  • or running pnpm moonwall test zombie_simple_template_upgrade

What the test does:

The test fetches the latest node associated with the latest runtime release and spawns a zombienet network composed of one relay, tanssi and a container. Once these are up, the container-chain is upgraded with the compiled runtime.

@girazoki girazoki added D3-trivial PR contains trivial changes in a runtime directory that do not require an audit I4-tests 🎯 Tests need fixing, improving or augmenting. B0-silent Changes should not be mentioned in any release notes labels May 24, 2024
# Always run the commands from the "test" dir
cd $(dirname $0)/..

LATEST_RUNTIME_RELEASE=$(curl -s https://api.github.com/repos/moondance-labs/tanssi/releases | jq -r '.[] | select(.name | test("runtime";"i")) | .tag_name' | head -n 1 | tr -d '[:blank:]') && [[ ! -z "${LATEST_RUNTIME_RELEASE}" ]]
Copy link
Contributor

Choose a reason for hiding this comment

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

I bet this won't work because jq is not installed in the runner (but maybe I'm wrong)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it should, it's the same we are doing in the CI through a script

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TYPE=$(echo $RESPONSE | jq -r '.object.type')

Copy link
Contributor

github-actions bot commented May 24, 2024

Coverage Report

(master)

@@                               Coverage Diff                                @@
##           master   girazoki-add-zombie-upgrade-tests-containers      +/-   ##
================================================================================
+ Coverage   69.19%                                         69.33%   +0.14%     
  Files         221                                            221              
- Lines       39049                                          38618     -431     
================================================================================
- Hits        27017                                          26775     -242     
- Misses      12032                                          11843     -189     
Files Changed Coverage
/pallets/data-preservers/src/lib.rs 87.23% (-2.44%) 🔽

Coverage generated Fri May 24 14:21:41 UTC 2024

@girazoki girazoki marked this pull request as ready for review May 24, 2024 14:12
@girazoki girazoki merged commit 4c664c5 into master Jun 5, 2024
36 checks passed
@girazoki girazoki deleted the girazoki-add-zombie-upgrade-tests-containers branch June 5, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B0-silent Changes should not be mentioned in any release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit I4-tests 🎯 Tests need fixing, improving or augmenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants