Files
coredesktop/smoketest/scenarios/41-failing-hook.sh
T
david 5ed3df55e3
shellcheck / shellcheck (push) Failing after 14s
further checks
2026-11-04 10:05:50 -07:00

18 lines
626 B
Bash

#!/bin/bash
# shellcheck disable=SC2034
DESCRIPTION="a failing update hook fails the update but not the hooks after it"
IMAGE=installed
TIER="pr"
scenario() {
upstream_commit "Add a failing hook" '
printf "%s\n" "#!/bin/bash" "run_update() { echo smoketest: failing; return 1; }" > updates.d/13-smoketest-fail.sh
printf "%s\n" "#!/bin/bash" "run_update() { touch ~/smoketest-after; }" > updates.d/96-smoketest-after.sh'
cd_update
assert_status 1
assert_output "smoketest: failing"
assert_output "Done, with errors in: 13-smoketest-fail.sh"
assert_vm "the hook after it ran" 'test -f ~/smoketest-after'
}