fix: restart repeat provisions and record live controller
This commit is contained in:
parent
3ff80fa10b
commit
e99135dbb5
4 changed files with 66 additions and 4 deletions
|
|
@ -100,6 +100,16 @@ test("provision copies only declared files and verifies loopback health", async
|
|||
assert.match(fs.readFileSync(path.join(unitDir, "example.service"), "utf8"), new RegExp(commit));
|
||||
assert.equal(commands.some(([, args]) => args.includes("enable") && args.includes("--now")), true);
|
||||
assert.equal(healthChecks, 2);
|
||||
commands.length = 0;
|
||||
const repeat = await provision({ target: "JD-FD-PRIMARY", action: "provision-approved-architecture", resource: `${requestId}@${commit}` }, {
|
||||
repoDir, releasesDir, unitDir, receiptsDir,
|
||||
run: async (file, args) => { commands.push([file, args]); return { stdout: args.includes("rev-parse") ? `${commit}\n` : "" }; },
|
||||
getJson: async () => ({ ok: true, mode: "read-only" }),
|
||||
healthDelayMs: 0,
|
||||
});
|
||||
assert.equal(repeat.ok, true);
|
||||
assert.equal(commands.some(([, args]) => args[0] === "restart" && args[1] === "example.service"), true);
|
||||
assert.equal(commands.some(([, args]) => args.includes("enable") && args.includes("--now")), false);
|
||||
} finally { fs.rmSync(root, { recursive: true, force: true }); }
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue