Fix updater tests for image pinning; harden helper load (node-26#19)
- test_host_updater: stub git/docker now model cat-file/show/rev-parse --verify and compose config/image inspect. The two update-path tests were failing on Linux CI (skipped locally on macOS, no flock). Adds tests for pull-before-checkout + .env pins, a missing pinned image leaving the node unchanged, and a pre-pinning target still updating. - drb-update.sh: load image-tags.sh via a variable + eval and confirm the functions exist; `source <(git show ...)` "succeeded" with nothing defined when git show failed, wedging every later update. - install.sh: skip pinning (warn) when the checked-out ref predates scripts/image-tags.sh instead of dying on the missing file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6c8289f3f3
commit
e7b4aef142
+10
-4
@@ -340,10 +340,16 @@ fi
|
||||
# Pin every image to the source just checked out (node-26#19, D3). Written
|
||||
# into .env — fresh or preserved — so later manual `docker compose` runs on
|
||||
# this node use the same pins.
|
||||
# shellcheck source=scripts/image-tags.sh
|
||||
. "$INSTALL_DIR/scripts/image-tags.sh"
|
||||
drb_pin_image_tags "$INSTALL_DIR/.env" "$INSTALL_DIR" "$RESOLVED_SHA" || die "could not write image pins to .env"
|
||||
ok "images pinned to the source at ${RESOLVED_SHA:0:12} (DRB_TAG_* in .env)"
|
||||
# A --ref older than #19 has no helper; its compose file hardcodes its tags.
|
||||
if [ -f "$INSTALL_DIR/scripts/image-tags.sh" ]; then
|
||||
# shellcheck source=scripts/image-tags.sh
|
||||
. "$INSTALL_DIR/scripts/image-tags.sh"
|
||||
drb_pin_image_tags "$INSTALL_DIR/.env" "$INSTALL_DIR" "$RESOLVED_SHA" || die "could not write image pins to .env"
|
||||
ok "images pinned to the source at ${RESOLVED_SHA:0:12} (DRB_TAG_* in .env)"
|
||||
else
|
||||
warn "$REF predates image pinning (node-26#19) — using its compose file's default image tags"
|
||||
drb_images_present() { return 0; }
|
||||
fi
|
||||
|
||||
# ── 5. Enrollment ───────────────────────────────────────────────────────────
|
||||
# Client half of Server/drb-c2-core/app/routers/enrollment.py. It does NOT
|
||||
|
||||
Reference in New Issue
Block a user