test: every rehearsal installs with apt and proves which version landed
The dirty-upgrade lab installed the new package with dpkg -i. Since 0.2.6.2 the package conflicts with khelpcenter, which dpkg refuses and apt resolves, so the 0.2.2 rehearsal left the machine on 0.2.2 and asked every question of the old release. Old package, new package and the reinstall now all go through apt, as ekklesia-classroom-update does, and each stops the run unless dpkg reports exactly that version, fully installed. The container gate asserts the same of its previous release and its reinstall. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9fc86f9d4c
commit
6c04f743ed
+39
-9
@@ -13,6 +13,8 @@
|
||||
# tools/lab/dirty-upgrade [NEW.deb] [OLD.deb]
|
||||
# CHECK_ARGS=--restart tools/lab/dirty-upgrade ask twice, either side
|
||||
# of a logout
|
||||
# tools/lab/dirty-upgrade NEW.deb dist/ekklesia-classroom_0.2.2_amd64.deb
|
||||
# the day the desktops move from 0.2.2
|
||||
#
|
||||
# The container is restarted between the install and the session, because
|
||||
# a room takes its upgrade and reboots.
|
||||
@@ -38,13 +40,30 @@ docker exec "$NAME" sh -c '
|
||||
# backports for Hyprland. The lab is not testing that.
|
||||
systemctl mask ekklesia-classroom-provision.service >/dev/null 2>&1'
|
||||
|
||||
# Which version is installed, fully configured, or the rehearsal stops.
|
||||
# Every step below is a question about one particular release, and a
|
||||
# step that quietly left the machine on another one answers for the
|
||||
# wrong release — which is how the 0.2.2 rehearsal once passed on 0.2.2.
|
||||
require_installed() {
|
||||
local want got
|
||||
want=$(dpkg-deb --field "$1" Version)
|
||||
got=$(docker exec "$NAME" dpkg-query -W -f='${Version} ${db:Status-Abbrev}' ekklesia-classroom 2>/dev/null || true)
|
||||
echo " installed: $got"
|
||||
|
||||
if [[ "$got" != "$want ii " ]]; then
|
||||
echo " $(basename "$1") DID NOT INSTALL: [$got], wanted [$want ii]" >&2
|
||||
echo " Nothing after this would be a question about $want." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
step "the old classroom: $(basename "$OLD")"
|
||||
# With apt, the way a room installs anything, so an old package's own
|
||||
# dependencies are resolved rather than forced.
|
||||
docker exec "$NAME" sh -c "
|
||||
DEBIAN_FRONTEND=noninteractive dpkg -i '/srv/classroom/${OLD#$ROOT/}' >/dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y -qq -f install >/dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive dpkg --configure ekklesia-classroom >/dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq '/srv/classroom/${OLD#$ROOT/}' >/dev/null 2>&1
|
||||
true" || true
|
||||
docker exec "$NAME" dpkg-query -W -f=' installed: ${Version}\n' ekklesia-classroom
|
||||
require_installed "$OLD"
|
||||
|
||||
step "and everything a used machine accumulates"
|
||||
docker exec -i "$NAME" bash <<'DIRT'
|
||||
@@ -164,14 +183,16 @@ DIRT
|
||||
step "the new classroom: $(basename "$NEW")"
|
||||
docker exec "$NAME" sh -c '
|
||||
systemctl unmask ekklesia-classroom-provision.service >/dev/null 2>&1 || true'
|
||||
# The way ekklesia-classroom-update installs it: apt, not dpkg. The
|
||||
# package conflicts with khelpcenter since 0.2.6.2, and dpkg -i refuses a
|
||||
# conflict where apt resolves it — so from 0.2.2 this step used to leave
|
||||
# the machine on 0.2.2 and every check below was asked of the old release.
|
||||
docker exec "$NAME" sh -c "
|
||||
DEBIAN_FRONTEND=noninteractive dpkg -i '/srv/classroom/${NEW#$ROOT/}' 2>&1 \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y '/srv/classroom/${NEW#$ROOT/}' 2>&1 \
|
||||
| grep -E '^\[classroom-migrate\]' || true
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y -qq -f install >/dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive dpkg --configure ekklesia-classroom >/dev/null 2>&1
|
||||
rm -f /usr/sbin/policy-rc.d
|
||||
true" || true
|
||||
docker exec "$NAME" dpkg-query -W -f=' installed: ${Version} ${db:Status-Abbrev}\n' ekklesia-classroom
|
||||
require_installed "$NEW"
|
||||
|
||||
step "and the room reboots"
|
||||
"$LAB" reboot
|
||||
@@ -188,8 +209,9 @@ step "and again, installed a second time over itself"
|
||||
# An update that changes nothing must change nothing. The migration runs
|
||||
# again here, over a machine that is already converged.
|
||||
docker exec "$NAME" sh -c "
|
||||
DEBIAN_FRONTEND=noninteractive dpkg -i '/srv/classroom/${NEW#$ROOT/}' >/dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --reinstall -y -qq '/srv/classroom/${NEW#$ROOT/}' >/dev/null 2>&1
|
||||
true" || true
|
||||
require_installed "$NEW"
|
||||
before=$(docker exec "$NAME" sh -c 'cat /etc/ekklesia-classroom/device.conf | sha256sum')
|
||||
"$LAB" plasma-down >/dev/null
|
||||
"$LAB" plasma-up >/dev/null
|
||||
@@ -230,6 +252,14 @@ fi
|
||||
theme dark >/dev/null
|
||||
echo " back to $(theme show)"
|
||||
|
||||
step "and every desktop has the classroom's wallpaper, however it was made"
|
||||
# Tiny Pebbles, 0.2.2 -> 0.2.6.4: a desktop Plasma made after the layout
|
||||
# had run came up with Plasma's own wallpaper, and nothing here noticed,
|
||||
# because every session this rehearsal started had its screen from the
|
||||
# beginning. This makes Plasma build one by itself, and puts Tiny
|
||||
# Pebbles' own file in front of a shell restart.
|
||||
"$ROOT/tools/lab/wallpaper-check" || converged=1
|
||||
|
||||
step "and it still recovers"
|
||||
"$ROOT/tools/lab/recovery-check" || converged=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user