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 moonwall integration tests #1194

Merged
merged 54 commits into from
Feb 9, 2024

Conversation

Chralt98
Copy link
Member

@Chralt98 Chralt98 commented Nov 29, 2023

What does it do?

Fixes #1186

It adds integration tests for our parachain setup and current live chains (main-net and battery-station) and uses those in our CI.

What important points should reviewers know?

This PR depends on #1192

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues?

References

@Chralt98 Chralt98 added the s:in-progress The pull requests is currently being worked on label Nov 29, 2023
@Chralt98 Chralt98 self-assigned this Nov 29, 2023
@Chralt98
Copy link
Member Author

Don't forget to add your tests to the CI.

@Chralt98 Chralt98 added s:review-needed The pull request requires reviews s:in-progress The pull requests is currently being worked on and removed s:in-progress The pull requests is currently being worked on s:review-needed The pull request requires reviews labels Dec 14, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b6922bd) 93.25% compared to head (5bd843a) 93.25%.
Report is 3 commits behind head on chralt98-add-integration-tests.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           chralt98-add-integration-tests    #1194   +/-   ##
===============================================================
  Coverage                           93.25%   93.25%           
===============================================================
  Files                                 121      121           
  Lines                               34162    34162           
===============================================================
  Hits                                31858    31858           
  Misses                               2304     2304           
Flag Coverage Δ
tests 93.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

integration-tests/README.md Outdated Show resolved Hide resolved
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews and removed s:in-progress The pull requests is currently being worked on labels Jan 8, 2024
@Chralt98 Chralt98 requested a review from maltekliemann January 8, 2024 09:39
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews and removed s:review-needed The pull request requires reviews labels Jan 8, 2024
@sea212 sea212 added this to the v0.5.1 milestone Jan 10, 2024

Useful for integration testing:

- `./integration-tests/scripts/deploy-zombienet.sh` - Deploy a local relay-parachain network for zombienet.
Copy link
Contributor

Choose a reason for hiding this comment

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

Getting this on Ubuntu VM. I did call cargo build ...

Copy link
Member Author

Choose a reason for hiding this comment

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

What did you get?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ooops, screenshot didn't load
Screenshot 2024-01-21 at 19 30 06

Copy link
Member Author

@Chralt98 Chralt98 Jan 22, 2024

Choose a reason for hiding this comment

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

You have the same error like previously. It's because you are missing the polkadot binary.

Can you try running the following first?

cd integration-tests
./scripts/download-polkadot.sh

Will add this to the documentation properly, if everything works fine on your side.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ends on this. That's what it's supposed to look like?
Screenshot 2024-01-23 at 12 54 18

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly what you can see there. It starts the network by spawning a zeitgeist node (alice) and two polkadot validators. You can do whatever you want on polkadot js now.

Copy link
Member Author

Choose a reason for hiding this comment

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

- `./integration-tests/scripts/deploy-zombienet.sh` - Deploy a local relay-parachain network for zombienet.
- `pnpm chopsticks xcm -r polkadot -p ./configs/hydradx.yml -p ./configs/zeitgeist.yml` - Deploy a local relay-parachain fork network via chopsticks to test XCM.
- `./integration-tests/scripts/deploy-zombienet.sh --test` - Run ZNDSL zombienet tests on a local relay-parachain network.
- `pnpm exec moonwall test zombienet_zeitgeist_upgrade` - Test Zeitgeist runtime upgrade on zombienet for the local network.
Copy link
Contributor

Choose a reason for hiding this comment

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

Getting this on Ubuntu VM
Screenshot 2024-01-21 at 19 39 21

Copy link
Member Author

Choose a reason for hiding this comment

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

This often takes a little bit longer. It's often on my machine too: fetching metrics...

Copy link
Contributor

Choose a reason for hiding this comment

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

So the fact that it says "Error" shouldn't concern me?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't do anything about it. It is just stated, because the nodes are not ready to fetch the metrics yet. It's because the nodes are still in the process of starting the metric endpoint.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, we should add this to the README

Copy link
Member Author

Choose a reason for hiding this comment

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

- `./integration-tests/scripts/deploy_zombienet.sh --test` - Run ZNDSL zombienet tests on a local relay-parachain network.
- `pnpm exec moonwall test chopsticks_zeitgeist_hydra_xcm_tests` - XCM Tests from Zeitgeist to HydraDX.
- `pnpm exec moonwall test zombienet_zeitgeist_upgrade` - Test Zeitgeist runtime upgrade on zombienet for the local network.
- `pnpm exec moonwall test chopsticks_zeitgeist_upgrade` - Test Zeitgeist runtime upgrade on chopsticks for the live network.
Copy link
Contributor

Choose a reason for hiding this comment

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

This one passes on the Linux VM.

@mergify mergify bot added s:in-progress The pull requests is currently being worked on and removed s:review-needed The pull request requires reviews labels Feb 7, 2024
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews and removed s:in-progress The pull requests is currently being worked on labels Feb 7, 2024
@mergify mergify bot added s:in-progress The pull requests is currently being worked on and removed s:review-needed The pull request requires reviews labels Feb 9, 2024
@Chralt98 Chralt98 mentioned this pull request Feb 9, 2024
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews s:in-progress The pull requests is currently being worked on and removed s:in-progress The pull requests is currently being worked on s:review-needed The pull request requires reviews labels Feb 9, 2024
@Chralt98 Chralt98 merged commit 6240fe3 into chralt98-add-integration-tests Feb 9, 2024
15 of 22 checks passed
@Chralt98 Chralt98 deleted the chralt98-add-it-tests branch February 9, 2024 12:17
@sea212 sea212 added s:accepted This pull request is ready for merge and removed s:in-progress The pull requests is currently being worked on labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:accepted This pull request is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants