fix: require current-main deploy desired state
This commit is contained in:
committed by
Code Queue Review
parent
b9b625c4e8
commit
fff45edf4c
@@ -277,6 +277,18 @@ test("target tag review is read-only promotion_pending when current state is uni
|
||||
assert.match(plan.services[0].promotion.deployImage, /:def5678$/u);
|
||||
});
|
||||
|
||||
test("target check blocks when current desired-state is uniformly older", async () => {
|
||||
const repoRoot = await makeFixture();
|
||||
const plan = await buildDesiredStatePlan({ repoRoot, targetTag: "def5678", requireTargetConvergence: true });
|
||||
assert.equal(plan.status, "blocked");
|
||||
assert.equal(plan.target.convergence.state, "target_mismatch");
|
||||
assert.equal(plan.target.convergenceRequirement, "target-check");
|
||||
assert.ok(plan.diagnostics.some((diagnostic) =>
|
||||
diagnostic.code === "target_desired_state_mismatch" &&
|
||||
diagnostic.message.includes("stale desired-state is not pinned")
|
||||
));
|
||||
});
|
||||
|
||||
test("promotion commit check blocks when current desired-state is uniformly older", async () => {
|
||||
const repoRoot = await makeFixture();
|
||||
const plan = await buildDesiredStatePlan({ repoRoot, promotionCommit: "def5678" });
|
||||
|
||||
Reference in New Issue
Block a user