tests: remove usage of FakeApt fixtures in lifecycle
Metadata
Current evaluation
Merged changes replacing FakeApt fixtures in lifecycle tests with targeted mock.patch calls and related cleanup. Approved by one reviewer and passed CI checks.
Suggested action: —
No scores available.
Issue body
Use a couple targetted mock.patches to provide equivalent
functionality. Some related cleanup included.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged changes replacing FakeApt fixtures in lifecycle tests with targeted mock.patch calls and related cleanup. Approved by one reviewer and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Replaced FakeApt fixtures in lifecycle tests with targeted mock.patch calls to maintain equivalent functionality, alongside related test cleanup. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes replacing FakeApt fixtures with mock.patches in lifecycle tests, including related cleanup to streamline test dependencies while maintaining equivalent functionality. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3025 tests: move FakeApt fixtures into deb tests | snapcraft | merged | Merged to relocate FakeApt test fixtures into the deb test suite, eliminating external dependencies and enabling safe modifications. Approved by a reviewer, passed CI, and modified three files with a net reduction of four lines. | |
| #2163 tests: add lifecycle ordering tests | snapcraft | merged | Merged changes adding lifecycle ordering tests and refactoring them into a dedicated package. Approved by a reviewer, passed CI checks, and increased code coverage by 0.02%. | |
| #3719 tests: fix lifecycle tests to run on new directory | snapcraft | merged | Merged a fix for lifecycle tests to run in a new directory instead of the current one. Approved by a reviewer, passed CI, and changed three lines. | |
| #2637 unit tests: make lifecycle tests more robust | snapcraft | merged | Merged updates to improve lifecycle unit test robustness. Replaced strict message assertions with flexible checks to prevent fake webserver output from causing false failures. Approved and passed CI. | |
| #118 tests: use tmp_path instead of mock_path | rockcraft | merged | Merged a unit test fix replacing mock_path with tmp_path to resolve fixture scope issues. Approved by one reviewer, passed CI, and modified 1 file (+3/-3 lines). | |
| #4452 test(spread): check for new lifecycle message | snapcraft | merged | Merged a test update to verify a new lifecycle message, resolving a regression from #4431. Approved by two reviewers with passing CI and stable coverage. The fix unblocks PR #4450. | |
| #563 fix(tests): replace ineffective call assertions | craft-parts | merged | Merged to main, resolving issue #368 by replacing ineffective assert_has_calls with assert mock_calls in packages.deb module tests. Approved by two reviewers, passed CI, and rebased before final merge. | |
| #1569 tests: refactor the fake snapd to not hardcode values | snapcraft | merged | Merged PR refactoring fake snapd tests to remove hardcoded values. Approved by two reviewers, CI passed. Six files changed with 238 additions and 126 deletions. Requires PR #1567. | |
| #831 Fixed/simplified some tests to isolate them of underlying apt. | charmcraft | merged | Merged test refactoring that isolates three tests from external apt dependencies. Replaced a charm plugin with a null plugin, removed a flawed integration test, and improved project setup for a linter test. CI passed. | |
| #766 fix(lifecycle): don't rebuild on test file changes | craft-application | merged | Merged fix that adds spread files to the lifecycle manager's ignore list, preventing unnecessary repulls when test files change. Approved by two reviewers, passed all CI checks, and resolves issue #756. |