feat: update caserun aggregation and v02 deploy config
This commit is contained in:
@@ -7,6 +7,7 @@ import test from "node:test";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
import { SERVICE_IDS } from "../internal/protocol/index.mjs";
|
||||
import { writeStructuredFile } from "./src/structured-config.mjs";
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
const repoRoot = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..");
|
||||
@@ -154,7 +155,7 @@ test("refresh is read-only by default", async () => {
|
||||
const payload = JSON.parse(result.stdout);
|
||||
assert.equal(payload.status, "published");
|
||||
assert.deepEqual(payload.wrote, []);
|
||||
assert.equal(payload.deployTruthPolicy, "deploy.json is human-authored runtime config; artifact promotion must not rewrite it");
|
||||
assert.equal(payload.deployTruthPolicy, "deploy.yaml is human-authored runtime config; artifact promotion must not rewrite it");
|
||||
});
|
||||
|
||||
test("refresh keeps reused service image tags from the publish report", async () => {
|
||||
@@ -327,9 +328,9 @@ test("v02 refresh accepts current runtime service full image tags", async () =>
|
||||
test("v02 refresh follows the current deploy endpoint instead of the retired 19667 freeze", async () => {
|
||||
const commitId = await git(["rev-parse", "HEAD"]);
|
||||
const tempDir = await mkdtemp(path.join(os.tmpdir(), "hwlab-refresh-v02-https-endpoint-"));
|
||||
const deployPath = path.join(tempDir, "deploy.json");
|
||||
const deployPath = path.join(tempDir, "deploy.yaml");
|
||||
const catalogPath = path.join(tempDir, "artifact-catalog.v02.json");
|
||||
await writeFile(deployPath, `${JSON.stringify({
|
||||
await writeStructuredFile(tempDir, deployPath, {
|
||||
environment: "dev",
|
||||
namespace: "hwlab-dev",
|
||||
endpoint: "http://74.48.78.17:16667",
|
||||
@@ -341,7 +342,7 @@ test("v02 refresh follows the current deploy endpoint instead of the retired 196
|
||||
}
|
||||
},
|
||||
services: SERVICE_IDS.map((serviceId) => ({ serviceId }))
|
||||
}, null, 2)}\n`);
|
||||
});
|
||||
await writeFile(catalogPath, `${JSON.stringify({
|
||||
catalogVersion: "v1",
|
||||
kind: "hwlab-artifact-catalog",
|
||||
@@ -374,7 +375,7 @@ test("v02 refresh follows the current deploy endpoint instead of the retired 196
|
||||
"full",
|
||||
"--target-ref",
|
||||
"HEAD",
|
||||
"--deploy-json",
|
||||
"--deploy-config",
|
||||
deployPath,
|
||||
"--catalog-path",
|
||||
catalogPath,
|
||||
|
||||
Reference in New Issue
Block a user