testing harness, coredesktop-dev
shellcheck / shellcheck (push) Failing after 17s

This commit is contained in:
2026-11-04 09:39:46 -07:00
parent c3ac9f49d0
commit 2b85af286f
21 changed files with 1073 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
# shellcheck disable=SC2034
DESCRIPTION="local edits to the checkout: kept if upstream doesn't touch the file, reported if it does"
IMAGE=installed
TIER=pr
# Expanded in the VM, not here
# shellcheck disable=SC2088
CD="~/.local/share/coredesktop"
scenario() {
assert_vm "edit README.md in the checkout" "echo '# local edit' >> $CD/README.md"
upstream_commit "Change packages.conf" 'echo "# upstream change" >> packages.conf'
cd_update
assert_status 0
assert_vm "the edit is kept" "tail -n 1 $CD/README.md | grep -qx '# local edit'"
assert_vm "the upstream change arrived" "tail -n 1 $CD/packages.conf | grep -qx '# upstream change'"
upstream_commit "Change README.md" 'echo "# upstream readme change" >> README.md'
cd_update
assert_status 1
assert_output "Done, with errors in: git pull"
assert_vm "throw the edit away" "git -C $CD checkout -- README.md"
cd_update
assert_status 0
}