tests: fix electron spread test
Metadata
Current evaluation
Merged PR #3944 (d9fd33a71) updated the Electron spread-test fixture to include TMPDIR, matching generated snap.yaml and fixing the failing test.
Resolution: closed resolved
Reason: PR snapcore/snapcraft#3944 was merged as commit d9fd33a71, aligning expected_snap.yaml with the generated Electron snap metadata.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Signed-off-by: Callahan Kovacs <callahan.kovacs@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/)?
- [X] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
I'm not sure if this is a "fix" or a "hack", nor why it started failing, but [this spread test](https://github.com/snapcore/snapcraft/tree/main/tests/spread/electron-builder/no-template) is failing with the error:
```
+ diff -U10 /snap/electron-builder-hello-world/x1/meta/snap.yaml /snapcraft/tests/spread/electron-builder/no-template/expected_snap.yaml
--- /snap/electron-builder-hello-world/x1/meta/snap.yaml 2022-10-07 18:27:23.000000000 +0000
+++ /snapcraft/tests/spread/electron-builder/no-template/expected_snap.yaml 2021-04-29 15:11:51.000000000 +0000
@@ -14,20 +14,21 @@
- unity7
- browser-support
- network
- gsettings
- audio-playback
- pulseaudio
- opengl
- raw-usb
environment:
DISABLE_WAYLAND: '1'
+ TMPDIR: $XDG_RUNTIME_DIR
PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH
SNAP_DESKTOP_RUNTIME: $SNAP/gnome-platform
LD_LIBRARY_PATH: $SNAP_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu
architectures:
- amd64
base: core18
confinement: strict
grade: stable
plugs:
gnome-3-28-1804:
+ echo 'snap.yaml does not match expected:'
snap.yaml does not match expected:
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3944 (d9fd33a71) updated the Electron spread-test fixture to include TMPDIR, matching generated snap.yaml and fixing the failing test. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in snapcore/snapcraft#3944 (d9fd33a71), updating the Electron spread-test fixture to expect TMPDIR and match the generated snap.yaml. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix for a failing electron spread test. Updated the expected snap.yaml to include the TMPDIR environment variable, resolving a diff mismatch. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix for a failing electron spread test by adding the missing TMPDIR environment variable to the expected snap.yaml, aligning it with generated output and resolving the test failure. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3312 spread tests: introduce electron-builder test | snapcraft | merged | Merged PR #3312 in commit 04f642ba9, adding an electron-builder useTemplate: false spread test with snapcraft.yaml and meta/snap.yaml comparisons. | |
| #3454 spread: update electron-builder test | snapcraft | merged | Merged PR #3454 in commit d96e236f2, updating two electron-builder spread-test files so expected results matched current generation behavior. | |
| #3323 electron-builder spread test: sync expected snapcraft.yaml | snapcraft | merged | Merged PR #3323 in commit c9941b82d, syncing the electron-builder spread test’s expected snapcraft.yaml with upstream changes. | |
| #521 test(spread): add an improved snap inspector test | fetch-service | merged | Merged in PR #521 (commit 06cd210), adding a more realistic snapd setup to the spread snap inspector test and exposing additional snapd network requests. | |
| #534 test(spread): workaround for flaky test | fetch-service | merged | Merged PR #534 (commit 4f89bb7) worked around #533 by skipping the flaky snap names-query assertion while retaining the other spread-test checks. | |
| #2211 tests: add spread suite for ament plugin | snapcraft | merged | Merged PR #2211 as commit bdaa8ea5, replacing the Ament plugin snapd integration test with a Spread suite and resolving LP #1783827. | |
| #2182 tests: add spread suite for autotools plugin | snapcraft | merged | PR #2182 merged to master as commit eadd86729, consolidating the Autotools plugin and snapd tests into a single Spread suite and resolving LP bug #1783825. |