-
Notifications
You must be signed in to change notification settings - Fork 1.1k
tests: Skip package installer tests on CI #6175
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Abhijat Malviya <[email protected]>
|
The module is skipped now on running pytest |
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.
Review completed. 2 suggestions posted.
Comment augment review to trigger a new review at any time.
| import pytest | ||
| from testcontainers.core.container import DockerContainer | ||
|
|
||
| pytest.skip( |
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.
Because the module-level skip runs after imports, from testcontainers.core.container import DockerContainer (line 4) will still execute; in environments without this dependency, collection will error instead of skipping. Consider ensuring the skip occurs before optional imports so the file reliably skips when intended.
🤖 Was this useful? React with 👍 or 👎
| from testcontainers.core.container import DockerContainer | ||
|
|
||
| pytest.skip( | ||
| "These tests will only be run for the action that generates the package repository", |
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.
This unconditionally skips the module in all environments; if you intend these tests to run in a dedicated release workflow, they will be skipped there as well. You could gate the skip on a CI-specific condition so the tests still run when triggered by the release action.
🤖 Was this useful? React with 👍 or 👎
|
@abhijat lets wait with this. I tried to fix it here: let's see if it helps |
Package installer tests routinely fail due to throttling on docker registry.
These tests also do not make sense when run as part of CI suite, they should only be run when new releases are created. Here these tests are skipped in CI. In the next PR they will be wired to run only as part of the action which sets up the package repository.