test: guard code queue artifact dry-run readiness
This commit is contained in:
@@ -88,6 +88,7 @@ function assertCommonDryRun(plan: JsonRecord, deployRef: string): void {
|
||||
const probe = asRecord(plan.registryProbe, "dry-run registryProbe");
|
||||
const target = asRecord(plan.target, "dry-run target");
|
||||
const liveApply = asRecord(plan.liveApply, "dry-run liveApply");
|
||||
const guard = asRecord(plan.selfBootstrapGuard, "dry-run selfBootstrapGuard");
|
||||
const validation = strings(plan.validation, "dry-run validation");
|
||||
const excludedTargets = asArray(plan.excludedTargets, "dry-run excludedTargets").map((item, index) => asRecord(item, `excludedTargets[${index}]`));
|
||||
const excludedText = JSON.stringify(excludedTargets);
|
||||
@@ -130,7 +131,11 @@ function assertCommonDryRun(plan: JsonRecord, deployRef: string): void {
|
||||
|
||||
assertCondition(liveApply.policy === "supervisor-only", "code-queue-mgr prod live apply must be supervisor-only", liveApply);
|
||||
assertCondition(liveApply.allowed === false, "code-queue-mgr prod live apply must be blocked in automation", liveApply);
|
||||
assertCondition(liveApply.requiresSupervisorApproval === true, "code-queue-mgr prod live apply must require supervisor approval", liveApply);
|
||||
assertCondition(String(liveApply.reason ?? "").includes("explicit supervisor confirmation"), "code-queue-mgr live apply reason must name supervisor confirmation", liveApply);
|
||||
assertCondition(plan.requiresSupervisorApproval === true, "code-queue-mgr prod dry-run must expose top-level supervisor approval requirement", plan);
|
||||
assertCondition(guard.selfBootstrapBlocked === true, "code-queue-mgr prod dry-run must expose self-bootstrap guard", guard);
|
||||
assertCondition(String(guard.targetScope ?? "").includes("code-queue-mgr-backend"), "code-queue-mgr guard must name the control-plane sidecar target", guard);
|
||||
assertCondition(validation.some((line) => line.includes("deploy.commit/deploy.requestedCommit")), "code-queue-mgr validation must require health deploy commit metadata", validation);
|
||||
assertCondition(excludedText.includes("code-queue"), "code-queue-mgr excluded targets must include code-queue", excludedTargets);
|
||||
assertCondition(excludedText.includes("scheduler"), "code-queue-mgr excluded targets must mention scheduler", excludedTargets);
|
||||
|
||||
Reference in New Issue
Block a user