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

Consolidate the integration test repos to a single one #789

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

slimreaper35
Copy link
Member

Maintainers will complete the following section

  • Commit messages are descriptive enough
  • Code coverage from testing does not decrease and new code is covered
  • Docs updated (if applicable)
  • Docs links in the code are still valid (if docs were updated)

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:

tests/integration/utils.py Outdated Show resolved Hide resolved
tests/integration/utils.py Outdated Show resolved Hide resolved
tests/integration/test_npm.py Outdated Show resolved Hide resolved
Copy link
Member

@eskultety eskultety left a comment

Choose a reason for hiding this comment

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

Not only did this consolidation clean up the mess we have in integration tests (some bits still remaining for a follow up), but by doing so it sped up the execution by at least 13%! (measured solely on the NPM test suite, so extrapolating it to the whole test suite where there are many more test cases may yield even better results).

I left some comments which should be simple to address and we're good to go.

tests/integration/test_npm.py Outdated Show resolved Hide resolved
tests/integration/utils.py Outdated Show resolved Hide resolved
Comment on lines -97 to +98
cmd: List,
tmpdir: StrPath,
cmd: list[str],
tmp_path: Path,
Copy link
Member

Choose a reason for hiding this comment

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

This hunk (multiple occurrences) seems like a non-related cosmetic change.

Copy link
Member

@eskultety eskultety Jan 27, 2025

Choose a reason for hiding this comment

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

This hasn't been addressed. Again, we're close to merging so let's not make a deal out of this, but please make sure you perform cosmetic changes like these (if at all) in a separate commit in the future to avoid polluting a diff with unrelated changes, it just prolongs the review itself.

tests/integration/utils.py Outdated Show resolved Hide resolved
tests/integration/utils.py Show resolved Hide resolved
tests/integration/utils.py Outdated Show resolved Hide resolved
@slimreaper35
Copy link
Member Author

slimreaper35 commented Jan 27, 2025

I tried to resolve the majority of the comments. I did not rebase, so the GitHub diff (Compare button) should provide all modified lines only by me.

EDIT: Adding a comment to git clean

tests/integration/utils.py Outdated Show resolved Hide resolved
Comment on lines -97 to +98
cmd: List,
tmpdir: StrPath,
cmd: list[str],
tmp_path: Path,
Copy link
Member

@eskultety eskultety Jan 27, 2025

Choose a reason for hiding this comment

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

This hasn't been addressed. Again, we're close to merging so let's not make a deal out of this, but please make sure you perform cosmetic changes like these (if at all) in a separate commit in the future to avoid polluting a diff with unrelated changes, it just prolongs the review itself.

@eskultety
Copy link
Member

@slimreaper35 seems like an update to yarn_v4 integration test data got lost somehow (I don't remember the tests failing originally).

For consistency with other package managers that all use the same
function names:

- test_<pkg-mngr>_packages
- test_e2e_<pkg-mngr>

Signed-off-by: Michal Šoltis <[email protected]>
This pytest fixture will be used for running integration tests that will
be present inside one repository. Scope of the fixture is "session" ->
for each pytest run, there will be only one git clone, because each
integration test lives in a separate branch.

Signed-off-by: Michal Šoltis <[email protected]>
Add a simple test to check disabled network access in each Containerfile
as an extra RUN command to ensure the hermetic build works correctly.

(better safe than sorry)

Signed-off-by: Michal Šoltis <[email protected]>
Modify each test module to use a branch (not a git commit) as a
reference inside the new integration test repository that contains all
integration (e2e) tests for cachi2.

Update and improve a few functions inside utils.py module.

Drop unnecessary lines from each Containerfile that were very often
duplicated along with the comments. They were tightly coupled with our
code printing output of specific files inside of directories coming
from pytest.

Remove unused "repo" test parameter and rename "ref" test parameter to
"branch".

Closes containerbuildsystem#676

Signed-off-by: Michal Šoltis <[email protected]>
Just run `nox -s generate-test-data` command.

Signed-off-by: Michal Šoltis <[email protected]>
@slimreaper35
Copy link
Member Author

@slimreaper35 seems like an update to yarn_v4 integration test data got lost somehow (I don't remember the tests failing originally).

I had to update test data because of the recent changes to yarn pedigree patches - db6e6d9

@eskultety eskultety added this pull request to the merge queue Jan 29, 2025
Merged via the queue into containerbuildsystem:main with commit f68209c Jan 29, 2025
16 checks passed
@eskultety eskultety deleted the oss branch January 29, 2025 08:27
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.

[oss] Consolidate the integration test repos to a single one
3 participants