Fix scoped deployment state and config ownership
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user