tests: don't use os_release and repo from snapcraft
Metadata
Current evaluation
Merged PR #2096 in commit 0e27e147d, replacing integration tests' use of Snapcraft's os_release and repo modules with test-specific helpers; it fixes #1982.
Resolution: closed resolved
Reason: The PR was merged in commit 0e27e147d and moved os_release and repository support into integration-test-specific modules. Its description explicitly states that it fixes #1982.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2096 in commit 0e27e147d, replacing integration tests' use of Snapcraft's os_release and repo modules with test-specific helpers; it fixes #1982. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #2096 merged (commit 0e27e147d): integration tests no longer import os_release/repo from the snapcraft module, using test-specific platform/repo helpers instead. Closes #1982. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2096 (commit 0e27e147d), replacing integration-test uses of snapcraft os_release/repo with test-specific helpers; the PR explicitly fixes #1982. | |
| 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. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#1982
(confidence 100%)
Closed issue #1982 was explicitly fixed by merged PR #2096.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1982 Update snaps_tests to use the testing tools from tests.integration | snapcraft | closed | Fixed by merged PR #2096 in commit 0e27e147d, replacing Snapcraft OS-release and repository dependencies in integration tests with test-specific helpers. | |
| #1625 tests: use the snapcraft snap for integration tests | snapcraft | merged | Merged PR #1625 updated integration tests to run the installed Snapcraft snap, better matching the user environment. Resolution: commit eebb070e6. | |
| #1849 tests: add snap not found tests | snapcraft | merged | Merged missing-snap test coverage; snapcraft PR #1849 landed as commit 54cf2bd9e. | |
| #2353 tests: remove dependency on snapcraft for integration tests | snapcraft | merged | PR #2353 by sergiusens merged as commit 6a7c860c4, dropping snapcraft imports from integration tests (27 files, +956/-733) so the suite no longer depends on snapcraft and tests stay independent, alongside the bases/multipass cleanup. | |
| #1194 tests: remove repo.Ubuntu patch for plugins | snapcraft | merged | Merged in PR #1194 (commit 8d7b0ec63), removing obsolete plugin repo.Ubuntu test patches after stage-packages handling moved into Snapcraft core. | |
| #3609 tests: move legacy snapcraft tests (CRAFT-728) | snapcraft | merged | Merged PR #3609 in commit a71aeff54, moving snapcraft_legacy unit tests from tests/unit to tests/legacy to match the package rename. | |
| #2295 tests: use SNAPCRAFT_PACKAGE_TYPE everywhere | snapcraft | merged | PR #2295 merged as commit ffbad69ea: unit tests now use SNAPCRAFT_PACKAGE_TYPE instead of legacy SNAPCRAFT_FROM_* env vars, and unused container tests were removed to ease migration to spread. (LP: #1794379) | |
| #2505 Test store | snapcraft | merged | Merged PR #2505 updated a Snapcraft test in one file (+16/-8); no release or resolving commit SHA was provided. | |
| #4755 tests: fix devel base snap test | snapcraft | merged | Merged #4755, fixing the devel-base integration test to verify Snapcraft can create the base snap and that the resulting devel base is usable. | |
| #1894 tests: allow to overwrite the snapcraft install command | snapcraft | merged | Merged PR #1894 as commit 596896be8, adding SNAPCRAFT_INSTALL_COMMAND so integration tests can override Snapcraft installation and skip the preceding build stage. |