Fix scoped deployment state and config ownership

This commit is contained in:
Frank
2026-08-25 20:24:47 -07:00
parent 3a56a07883
commit bc718f04f4
3 changed files with 65 additions and 9 deletions
+9
View File
@@ -110,6 +110,15 @@ REMOTE_DEPLOY="$REPO_ROOT/scripts/deploy-remote.sh"
[ "$status" -eq 2 ]
}
@test "remote runner recognizes a pending service at the same revision" {
local state_dir="$(mktemp -d)"
printf 'revision=%s\nstatus=pending\n' "$(git rev-parse HEAD)" > "$state_dir/unknown-service"
run env DEPLOY_STATE_DIR="$state_dir" REMOTE_DIR="$REPO_ROOT" \
bash "$REMOTE_DEPLOY" dankclaw "$(git rev-parse HEAD)" --pending
[ "$status" -eq 2 ]
[[ "$output" == *"unknown-service"* || "$output" == *"not deployed"* ]]
}
@test "top-level deployer delegates to the service-scoped remote runner" {
grep -q 'deploy-remote.sh' "$REPO_ROOT/scripts/deploy.sh"
grep -qE 'SERVICE|service' "$REPO_ROOT/scripts/deploy.sh"