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

Integration Tests #32

Open
ggwpez opened this issue Jun 26, 2024 · 1 comment
Open

Integration Tests #32

ggwpez opened this issue Jun 26, 2024 · 1 comment

Comments

@ggwpez
Copy link
Member

ggwpez commented Jun 26, 2024

We should probably have some regression end-to-end tests that take a historical set of Polkadot-SDK commit hashes and then run some commands. It should then assert on the output of the command and exit code.

I do something similar in Zepter to ensure that historic behaviour remains unchanged.

The command that we want to check the most is the prdoc command that is used extensively in the SDK CI.
First step would be to write some small unit tests that has some fixed crates. The checks for the prdoc command focus on semver changes, so there should be a test for at least each case: Major change, minor and patch. The test must assert that SemVer violations in the Minor and Patch category are flagged correctly and that Major changes can do anything.
Additionally it should have different prdoc files, some stating the correct changes and some stating incorrect changes.

Next step could be to use real crates like frame-support and use historic versions and commit hashes and check that the output+return value is as expected.

We can then use these tests to prevent regressions (situations where we break something that already worked).

@ggwpez
Copy link
Member Author

ggwpez commented Aug 2, 2024

Alternatively it is also possible to just start with simple unit tests about any functionality. Problem is that this project currently has zero tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant