← Back to issue list

tests: don't use os_release and repo from snapcraft

View original Github issue

Metadata

Project
snapcraft
Number
#2096
Type
pull request
State
merged
Author
kalikiana
Labels
Created
Updated
Closed

Current evaluation

Merged PR removing os_release and repo imports from the snapcraft module in integration tests, replacing them with dedicated modules. Fixes #1982. Approved by two reviewers and merged despite a suggestion to extract shared functionality.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- This PR removes uses of `os_release` and `repo` from the `snapcraft` module from the integration tests. Necessary functionality is instead added to the integration-specific `platform` and `repo` modules. Fixes: #1982 No tests were added or removed. I locally ran the tests: - `./runtests.sh tests/unit` with unrelated failures in [tests.unit.test_lifecycle.CoreSetupTestCase.test_core_setup_if_docker_env](https://bugs.launchpad.net/snapcraft/+bug/1752576), `tests.unit.test_mangling.TestClearExecstack.test_execstack_clears` and `tests.unit.test_elf`. - `./runtests.sh tests/integration` with one unrelated failure in [tests.integration.general.test_parser.TestParserWikis](https://bugs.launchpad.net/snapcraft/+bug/1752580) - `./runtests.sh static`: Everything passed

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged PR removing os_release and repo imports from the snapcraft module in integration tests, replacing them with dedicated modules. Fixes #1982. Approved by two reviewers and merged despite a suggestion to extract shared functionality.
qwen3.6-35b-a3b-mtp-q6 Merged. Decouples integration tests from snapcraft's os_release and repo modules by implementing local replacements. Fixes #1982. Reviewer noted functional duplication but approved the merge.
qwen3.6-35b-a3b-mtp-q6 Merged. Removes os_release and repo imports from the snapcraft module in integration tests, moving functionality to dedicated test modules to fix #1982. Reviewer suggested shared extraction but approved the merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2353 tests: remove dependency on snapcraft for integration tests snapcraft merged Merged after reviewer approval and passing CI. The change removes the snapcraft dependency from integration tests to improve test independence, modifying 27 files with 956 additions and 733 deletions.
76%
#1625 tests: use the snapcraft snap for integration tests snapcraft merged Merged after two approvals. The PR updates integration tests to run against the installed snapcraft snap, aligning with user environments. Despite a reported Go runtime address space conflict in CI, the changes were accepted and merged.
75%
#1652 tests: fork skip into snaps_tests snapcraft merged Merged changes that forked skip into snaps_tests to prevent overly broad imports in snapcraft.tests from breaking autopackage tests. Approved by two reviewers, passed CI, and modified three files.
73%
#3609 tests: move legacy snapcraft tests (CRAFT-728) snapcraft merged Merged following reviewer approval and passing CI. Relocated unit tests for the renamed snapcraft_legacy package to tests/legacy, modifying 313 files (+579/-564 lines).
73%
#2295 tests: use SNAPCRAFT_PACKAGE_TYPE everywhere snapcraft merged Merged PR #2295 to replace SNAPCRAFT_FROM_ environment variables with SNAPCRAFT_PACKAGE_TYPE across all tests, removing unused container tests and streamlining the spread testing transition. Approved with no coverage impact.
73%
#1948 tests: move test files out of the snapcraft dir snapcraft merged Merged reorganization of the test suite, moving test files out of the snapcraft directory. Approved by one reviewer, the change touched 788 files with 615 additions and 589 deletions.
72%
#1849 tests: add snap not found tests snapcraft merged Merged tests for missing snap scenarios. Approved by two reviewers and integrated into the codebase despite unresolved review comments and reported integration test timeouts.
72%
#1542 tests: add integration tests for build snaps snapcraft merged Merged integration tests for build snaps. Approved by two reviewers and passed CI. Two test scenarios omitted due to known bugs.
72%
#648 Implemented `snapcraft release` snapcraft merged Merged implementation of the snapcraft release command by sergiusens. The update modifies 12 files, adding 455 lines and removing 23. Reviewer come-maiz approved the changes, which were successfully integrated into the codebase.
72%
#1394 tests: document the test suites in the snapcraft repo snapcraft merged Test suite documentation added to snapcraft. Approved by two reviewers, the merge updated two files with 160 additions and 33 deletions to clarify test execution. Reviewer feedback was incorporated prior to merging.
72%