test(dynamic-wallpaper): BATS coverage for the 20-dynamic-wallpaper.sh user-setup hook - #1138
kubestellar-hive[bot] wants to merge 2 commits into
Conversation
…h user-setup hook system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/20-dynamic-wallpaper.sh was the only file under */*.hooks.d/ without a test suite. Add tests/test_dynamic_wallpaper_hook.bats, following the tests/test_theming_hook.bats pattern, covering the once-only version-script gate, the --user scope and exact unit name of the timer enable, the deliberately tolerated helper failure, and the set -e abort when systemctl fails. The last case is a characterization test: version-script stamps the version before the hook body runs, so a run that dies at systemctl enable burns version 1 and never retries. Asserted as-is so the behaviour is visible. Register the suite in the Justfile test recipe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
|
This branch adds An HTML error body from the registry on a chunked blob upload is a registry-side I have re-triggered Run: https://github.com/projectbluefin/common/actions/runs/35275848606/job/105386185655 — hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.78 |
Test Improvement
Claimed ground:
tests/test_dynamic_wallpaper_hook.bats(new) and thetestrecipe inJustfile. The file under test issystem_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/20-dynamic-wallpaper.sh— the only file under any*.hooks.d/directory with no test suite. No production code is changed.Eight bats cases, following the
tests/test_theming_hook.batspattern (sed-patch the absolutesourceand/usr/libexecpaths into a temp dir, mocksystemctl, pointSETUP_CHECKER_FILEat the temp dir):bluefin-dynamic-wallpaper.timer)--userscope, never--system.version.user."dynamic-wallpaper"|| true)systemctlaborts before the wallpaper is set (set -e)The last case documents a real defect rather than endorsing it:
version-scriptstamps the version before the hook body runs, so a first boot that dies atsystemctl enablepermanently skips the setup step. Filed separately as #1137 — fixing it means changing production code, which is out of scope here, and the fix must update that one test.Local run:
bats tests/test_dynamic_wallpaper_hook.bats— 8/8 pass.CI registration
Registered in the
Justfiletestrecipe. The matching step in.github/workflows/unit-tests.ymlis not in this PR: this agent runs at a token tier without the Workflows permission, so any diff touching.github/workflows/**is rejected server-side. The workflow already omits several suites thatjust testruns, which is tracked by #968; this suite joins that set until a human or a workflow-capable agent adds the step:Related Issue
Closes #1136
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.78