-
Notifications
You must be signed in to change notification settings - Fork 28
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 minor improvements #783
base: main
Are you sure you want to change the base?
Conversation
tests/integration/utils.py
Outdated
@@ -35,7 +35,7 @@ | |||
) | |||
) | |||
SUPPORTED_PMS: frozenset[str] = frozenset( | |||
list(resolver._package_managers) + list(resolver._dev_package_managers) | |||
list(resolver._package_managers) + list(resolver._dev_package_managers) + ["yarn_classic"] |
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 gets the job done although I wonder if we could improve things a little by enclosing it in a variable called extra
to make it more explicit that this is an unusual case.
Ultimately we might need to rename SUPPORTED_PMS
to something else if the solution will need to consider other data beyond the PM scope (currently such changes run all integration tests), but that is out of scope for this PR.
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.
Do you mean something like this ?
SUPPORTED_PMS = list(resolver._package_managers)
DEV_PMS = list(resolver._dev_package_managers)
EXTRA_PMS = ["yarn_classic"]
ALL_PMS: frozenset[str] = frozenset(SUPPORTED_PMS + DEV_PMS + EXTRA_PMS)
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.
Pretty much, except that ALL_PMS would be named something else, e.g. TRACKED_DIRS
or something more descriptive once you leave the realm of only wanting to filter tests solely based on actual pkg mgr backends. Like I said, we don't need to do that part now since we only have a single representative for the "extra" part so that would suffice :) .
`yarn` and `yarn classic` are used interchangeably for cachi2 requests -> only `yarn` is among supported package managers Our functionality for integration tests skips those not affected by certain package manager. Since `yarn classic` is not a valid name as a supported package manager, integration tests were never skipped, becuase these are marked as `test_yarn_classic...` in a separate module. Signed-off-by: Michal Šoltis <[email protected]>
Currently, the `nox -s generate-test-data` runs only on tests marked as e2e because of passing the `PYTEST_ADDOPTS` env variable. This was unfortunately implemented based on my wrong assumption that only e2e tests with docker builds generate SBOM. Fix the command and run all integration tests when someone wants to regenerate test data based on their changes. Signed-off-by: Michal Šoltis <[email protected]>
Signed-off-by: Michal Šoltis <[email protected]>
Maintainers will complete the following section
Note: if the contribution is external (not from an organization member), the CI
pipeline will not run automatically. After verifying that the CI is safe to run:
/ok-to-test
(as is the standard for Pipelines as Code)