fix(test): do not create 2 snapcraft.yaml and confuse location
Metadata
Current evaluation
Merged PR #4662 as commit a50b0617a, fixing test fixture paths so tests do not create duplicate root and /snap manifests that cause ambiguous hook lookup.
Resolution: closed resolved
Reason: PR #4662 was merged as a50b0617a, correcting the test fixture path and eliminating duplicate-manifest and hook-location ambiguity. It followed prerequisite PR #4661, merged as 16127c502.
Evaluated by: mr-cal-bot
No scores available.
Issue body
There are 2 bugs:
First, the current fixture `snapcraft_yaml` may create 2 `snapcraft.yaml` in `/` and `/snap/` due to it used in different places and it is default to `/snap/snapcraft.yaml`.
When both `snapcraft.yaml` exists, the `/snapcraft.yaml` is used without any error / warning.
The second bug is when `/snap/snapcraft.yaml` exists, `/build-aux/snap` will be ignored even if it had hooks in it. This is probably expected behavior since these are two different versions of the structure.
Needs #4661
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #4662 as commit a50b0617a, fixing test fixture paths so tests do not create duplicate root and /snap manifests that cause ambiguous hook lookup. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #4662 as commit a50b0617a, correcting test fixture paths so duplicate root and snap/snapcraft.yaml files no longer cause ambiguous configuration and hook locations. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #4662 as a50b0617a, fixing test fixtures that created both /snapcraft.yaml and /snap/snapcraft.yaml and caused ambiguous configuration and hook handling. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #4662 as commit a50b0617a, fixing test fixtures that could create duplicate /snapcraft.yaml and /snap/snapcraft.yaml files, causing manifest and hooks-location ambiguity. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #4662 as commit a50b0617a, correcting test fixture paths to avoid duplicate root and snap/snapcraft.yaml files and resulting configuration and hook-location ambiguity. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #4662 (commit a50b0617a), fixing test fixtures that created conflicting root and /snap/snapcraft.yaml files and could hide hooks. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a test fix preventing duplicate snapcraft.yaml creation in conflicting root and snap directories. Resolves silent overrides and ensures hooks are detected by clarifying fixture paths. Approved and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for a test fixture bug that created duplicate snapcraft.yaml files in / and /snap/, causing incorrect file resolution and ignored hooks. Updated with additional explanation per reviewer request. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft#4661
(confidence 99%)
The body identifies #4661 as a prerequisite; it updated related tests to use the prime directory.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4661 fix(test): use prime dir in some tests | snapcraft | merged | Merged PR #4661 in commit 16127c502 updated manifest-generation tests to use Snapcraft's prime directory, correcting the test setup. | |
| #392 test: remove artifact location workaround | fetch-service | merged | Merged as commit bdfc9b8, removing the CI test artifact-location workaround after Snapcraft fixed artifact discovery; resolves #391. | |
| #1849 tests: add snap not found tests | snapcraft | merged | Merged missing-snap test coverage; snapcraft PR #1849 landed as commit 54cf2bd9e. | |
| #46 tests: add fake snapd fixture | craft-parts | merged | Merged PR #46 as 64fdf574 (feature commit 9db65074), adding a 212-line fake snapd fixture for testing snap package handling in craft-parts.packages. | |
| #85 test: cleanup test now that we have a new enough snapcraft | snapcraft-rocks | merged | Merged in snapcraft-rocks#85, removing six obsolete test lines after upgrading past the stable Snapcraft behavior delivered by canonical/snapcraft#4666. | |
| #6224 fix(test): correct match string in try test | snapcraft | merged | Merged PR #6224 in commit 78ef8569b, correcting the snapcraft try test match string after #6193 changed the effective-base output. | |
| #1877 tests: move test files out of the snapcraft dir | snapcraft | closed | Closed unmerged after conflicts; the test reorganization was redone and merged via snapcraft#1948 at commit 55ad11ccc, moving tests out of the snapcraft package. | |
| #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. | |
| #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. | |
| #2096 tests: don't use os_release and repo from snapcraft | snapcraft | merged | 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. |