-
Notifications
You must be signed in to change notification settings - Fork 9
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
compatible: Add pytest-operator plugin for test grouping #65
Conversation
05e5ab3
to
11f0291
Compare
Tested on canonical/mysql-operator#252 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very promising!
|
||
By default, [pytest-operator](https://github.com/charmed-kubernetes/pytest-operator) runs each test file (Python module) in a separate Juju model. Usually, on GitHub, each integration test file is run in parallel (on separate runners). | ||
|
||
This plugin allows further parallelization—an individual test file can be split into multiple groups. Each group can run on a separate GitHub runner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nice!
3fc512c
to
39b567b
Compare
filtered_items.append(function) | ||
elif group_number == config.option.group: | ||
filtered_items.append(function) | ||
items[:] = filtered_items |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curiosity: will not this just override items content? why not just
items[:] = filtered_items | |
items = filtered_items |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the suggested code will move the reference of items
locally but will not replace the original list (and thus, not modify the items)
Will be used in future integration test reusable workflow