← Back to issue list

tests: fix lifecycle tests to run on new directory

View original Github issue

Metadata

Project
snapcraft
Number
#3719
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #3719 via commit 314dd7574 to run lifecycle tests in a new directory instead of the current directory.

Resolution: closed resolved

Reason: PR #3719 was merged into Snapcraft 7.0. Commit bd178b443 changed the lifecycle tests to execute in a separate directory, preventing them from affecting the working directory.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Fix lifecycle tests to not run on the current directory. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [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/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #3719 via commit 314dd7574 to run lifecycle tests in a new directory instead of the current directory.
stealth/space-bunny-alpha — closed resolved Merged PR #3719 into Snapcraft 7.0 in commit 314dd7574, changing lifecycle tests to run in a new directory instead of the current directory.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged into snapcraft/7.0, updating lifecycle tests to execute in a new directory rather than the current one. Accepted after maintainer review despite a minor 0.03% coverage decrease.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2163 tests: add lifecycle ordering tests snapcraft merged Merged in #2163 via commit efebd07e9, adding lifecycle-ordering tests and refactoring lifecycle tests into a dedicated package; Codecov reported 100% diff coverage.
75%
#624 test: use `new_dir` fixture craft-parts merged Merged PR #624 as commit d214d9d8, updating two unit tests to use new_dir so test files no longer pollute the repository working directory.
75%
#2057 tests: extract lifecycle suite from general suite snapcraft merged Merged PR #2057 as commit 59bdc3343, splitting lifecycle tests from the oversized general suite to prevent Travis timeouts.
73%
#1078 tests: do not rely on project_dir snapcraft merged Merged PR #1078 removed tests' reliance on project_dir, resolving LP #1659356; it landed as commit 4fe0247b8.
72%
#57 test: unit tests for lifecycle service debcraft open Adds unit tests for the Lifecycle service, but tests a helper (_get_prime_dirs_from_project) deleted by merged #68 and collides with the existing test_lifecycle.py from #139; needs a rewrite, not a rebase. CI: conventional-commits policy, lint and OSV-scanner failing.
72%
#3024 tests: remove usage of FakeApt fixtures in lifecycle snapcraft merged Merged PR #3024 in commit ab892ee03, replacing lifecycle tests' FakeApt fixtures with targeted mock patches and related cleanup.
72%
#3305 unit tests: fix runtests.sh not filtering tests when passed a subdirectory snapcraft merged Merged PR #3305 in e64c08aed, fixing runtests.sh to run only the requested test subdirectory instead of collecting the entire unit suite.
72%
#50 add unit tests for lifecycle.py rockcraft closed Added tests/unit/test_lifecycle.py covering lifecycle.py's pack paths (mainly _run_in_provider) in PR #83, commit 2f5b9c48; maintainer closed the issue pointing to that commit.
70%
#85 tests: move starbase tests to sub-directories starbase merged Merged PR #85 as commit 43f86da, moving tests into subdirectories for isolated Starbase ownership and cleaner downstream merges.
70%