diff --git a/tests/unit/removal-fixture.test.ts b/tests/unit/removal-fixture.test.ts index dbed9016..d9c54fce 100644 --- a/tests/unit/removal-fixture.test.ts +++ b/tests/unit/removal-fixture.test.ts @@ -75,19 +75,21 @@ async function copyCiContract(prefix: string): Promise { it("prunes removed command and evidence references and re-baselines the contract", async () => { const root = await copyCiContract("removal-fixture-contract-"); - // A command with evidence of its own, as a removed sample's tests had. + // A command with evidence of its own, as a removed sample's tests had. Not + // one a removal drill deletes: this test also runs inside those copies + // (test:recipes is gone in the optional-recipe removal copy). await pruneRemovalFixtureCiContract({ root, - removedScripts: new Set(["test:recipes"]), - removedEvidencePathFragments: ["optional-recipes.xml"], + removedScripts: new Set(["test:integration"]), + removedEvidencePathFragments: ["integration.xml"], }); const contract = await loadCiGateContract(root); - expect(contract.commands.some(({ script }) => script === "test:recipes")).toBe(false); - expect(contract.artifacts.some(({ path }) => path.includes("optional-recipes.xml"))).toBe(false); - expect(contract.gates.some(({ commandIds }) => commandIds.includes("test-recipes"))).toBe(false); + expect(contract.commands.some(({ script }) => script === "test:integration")).toBe(false); + expect(contract.artifacts.some(({ path }) => path.includes("integration.xml"))).toBe(false); + expect(contract.gates.some(({ commandIds }) => commandIds.includes("test-integration"))).toBe(false); expect(contract.gates.some(({ evidenceArtifactIds }) => - evidenceArtifactIds.includes("artifact-artifacts-tests-optional-recipes-xml") + evidenceArtifactIds.includes("artifact-artifacts-tests-integration-xml") )).toBe(false); const baseline = JSON.parse( await readFile(path.join(root, "config/ci/contract-baseline.json"), "utf8"),