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

Refactor tests #442

Merged
merged 4 commits into from
Apr 17, 2024
Merged

Refactor tests #442

merged 4 commits into from
Apr 17, 2024

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Apr 8, 2024

Currently, one has to manually pass in test files for tests for various image variants (targets). That's not very elegant; instead here we automatically skip all tests that are not intended to pass for a given image.
Note that there is a behavioural change: Previously, for e.g. lab variant, we would only run test-common.py and test-lab.py. But now we also test it against test-base.py. All images should pass all the tests for the lower layers as well. full-stack should pass all tests.

Also switched from black to ruff and added basic lint rules to help with writing tests.

@danielhollas danielhollas requested a review from unkcpz April 8, 2024 22:25
Base automatically changed from pip-user to main April 17, 2024 10:04
@danielhollas
Copy link
Contributor Author

@unkcpz this one is ready for review, LMK if you'll have a time to have a look (or perhaps nominate another reviewer?)

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Thanks @danielhollas, changes are all clear and looks all good.

@danielhollas danielhollas merged commit 7aba343 into main Apr 17, 2024
25 checks passed
@danielhollas danielhollas deleted the refactor-tests branch April 17, 2024 11:03
danielhollas added a commit that referenced this pull request Apr 17, 2024
Currently, one has to manually pass in test files for tests
for various image variants (targets).
Here we automatically skip all tests that are not intended
to pass for a given image. Note that there is a behavioural change:
Previously, for e.g. lab variant, we would only run test-common.py and test-lab.py.
Now we also test it against test-base.py, since all images should pass
 all the tests for the lower layers as well. full-stack should pass all tests.

* Use ruff formatter and linter
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

Successfully merging this pull request may close these issues.

2 participants