fix: remove obsolete hwpod db path
This commit is contained in:
@@ -164,17 +164,14 @@ assertCondition(
|
||||
hwlabHelpUsage.some((line) => line.includes("hwlab nodes secret status --node G14 --lane v03 --name hwlab-v03-code-agent-provider"))
|
||||
&& hwlabHelpUsage.some((line) => line.includes("hwlab nodes secret ensure --node G14 --lane v03 --name hwlab-v03-code-agent-provider --confirm"))
|
||||
&& hwlabHelpUsage.some((line) => line.includes("hwlab nodes secret status --node G14 --lane v03 --name hwlab-cloud-api-v03-db"))
|
||||
&& hwlabHelpUsage.some((line) => line.includes("hwlab nodes secret status --node G14 --lane v03 --name hwpod-v03-db"))
|
||||
&& hwlabHelpUsage.some((line) => line.includes("hwlab nodes secret cleanup-owned-postgres --node G14 --lane v03 --dry-run"))
|
||||
&& hwlabNodeHelpJson.includes("hwlab nodes secret status --node G14 --lane v03 --name hwlab-v03-code-agent-provider")
|
||||
&& hwlabNodeHelpJson.includes("hwlab nodes secret ensure --node G14 --lane v03 --name hwlab-v03-code-agent-provider --confirm")
|
||||
&& hwlabNodeHelpJson.includes("hwlab nodes secret status --node G14 --lane v03 --name hwlab-cloud-api-v03-db")
|
||||
&& hwlabNodeHelpJson.includes("hwlab nodes secret status --node G14 --lane v03 --name hwpod-v03-db")
|
||||
&& hwlabNodeHelpJson.includes("hwlab nodes secret cleanup-owned-postgres --node G14 --lane v03 --dry-run")
|
||||
&& !hwlabNodeHelpJson.includes("hwlab nodes secret ensure --node G14 --lane v03 --name hwlab-cloud-api-v03-db --confirm")
|
||||
&& !hwlabNodeHelpJson.includes("hwlab nodes secret ensure --node G14 --lane v03 --name hwpod-v03-db --confirm")
|
||||
&& !hwlabNodeHelpJson.includes("hwlab nodes secret ensure --node G14 --lane v03 --name hwlab-v03-openfga --confirm"),
|
||||
"v0.3 node-scoped secret help must expose provider bootstrap plus platform DB status/cleanup without old DB ensure paths",
|
||||
"v0.3 node-scoped secret help must expose provider bootstrap plus Cloud API platform DB status and old DB cleanup without old DB ensure paths",
|
||||
{ hwlabHelpUsage, hwlabNodeHelp: hwlabNodeHelp() },
|
||||
);
|
||||
const cloudApiDbStatus = nodeSecretStatusFromTextForTest([
|
||||
@@ -222,48 +219,6 @@ assertCondition(
|
||||
"cloud-api DB Secret status must be redacted while proving native platform DB SecretRef and bridge are present",
|
||||
cloudApiDbStatus,
|
||||
);
|
||||
const hwpodDbStatus = nodeSecretStatusFromTextForTest([
|
||||
"namespace\thwlab-v03",
|
||||
"secret\thwpod-v03-db",
|
||||
"key\tdatabase-url",
|
||||
"preset\thwpod-db",
|
||||
"action\tobserved",
|
||||
"dryRun\ttrue",
|
||||
"mutation\tfalse",
|
||||
"platformDbMode\ttrue",
|
||||
"afterExists\tyes",
|
||||
"afterDatabaseUrlPresent\tyes",
|
||||
"afterDatabaseUrlBytes\t172",
|
||||
"legacyPostgresSecret\thwlab-v03-postgres",
|
||||
"legacyPostgresSecretExists\tno",
|
||||
"platformService\tg14-platform-postgres",
|
||||
"platformServiceExists\tyes",
|
||||
"platformEndpointsExists\tno",
|
||||
"platformEndpointSlice\tg14-platform-postgres-host",
|
||||
"platformEndpointSliceExists\tyes",
|
||||
"dbName\thwpod_v03",
|
||||
"dbUser\thwpod_v03_app",
|
||||
"dbHost\tg14-platform-postgres.hwlab-v03.svc.cluster.local",
|
||||
"dbHostMatchesPlatform\tyes",
|
||||
"dbNameMatchesExpected\tyes",
|
||||
"dbUserMatchesExpected\tyes",
|
||||
].join("\n"), true, 0, "");
|
||||
assertCondition(
|
||||
record(hwpodDbStatus).ok === true
|
||||
&& record(hwpodDbStatus).valuesRedacted === true
|
||||
&& record(hwpodDbStatus).platformDbMode === true
|
||||
&& record(record(hwpodDbStatus).legacyPostgresSecret).exists === false
|
||||
&& record(record(hwpodDbStatus).platformService).endpointsExist === false
|
||||
&& record(record(hwpodDbStatus).platformService).legacyEndpointsAbsent === true
|
||||
&& record(record(hwpodDbStatus).platformService).endpointSlice === "g14-platform-postgres-host"
|
||||
&& record(hwpodDbStatus).dbName === "hwpod_v03"
|
||||
&& record(hwpodDbStatus).dbUser === "hwpod_v03_app"
|
||||
&& record(hwpodDbStatus).dbHost === "g14-platform-postgres.hwlab-v03.svc.cluster.local"
|
||||
&& !JSON.stringify(hwpodDbStatus).includes("postgres://")
|
||||
&& !JSON.stringify(hwpodDbStatus).includes("password"),
|
||||
"HWPOD DB Secret status must prove the v0.3 platform DB SecretRef without exposing database-url material",
|
||||
hwpodDbStatus,
|
||||
);
|
||||
const openFgaPlatformStatus = nodeSecretStatusFromTextForTest([
|
||||
"namespace\thwlab-v03",
|
||||
"secret\thwlab-v03-openfga",
|
||||
@@ -316,13 +271,6 @@ assertCondition(
|
||||
"v0.3 cloud-api DB ensure must reject the removed lane-local Postgres path",
|
||||
removedCloudApiDbEnsure,
|
||||
);
|
||||
const removedHwpodDbEnsure = runCommand(["bun", "scripts/cli.ts", "hwlab", "nodes", "secret", "ensure", "--node", "G14", "--lane", "v03", "--name", "hwpod-v03-db", "--dry-run"], process.cwd(), { timeoutMs: 30_000 });
|
||||
assertCondition(
|
||||
removedHwpodDbEnsure.exitCode !== 0
|
||||
&& `${removedHwpodDbEnsure.stdout}\n${removedHwpodDbEnsure.stderr}`.includes("was removed after native platform DB migration"),
|
||||
"v0.3 HWPOD DB ensure must reject the removed lane-local Postgres path",
|
||||
removedHwpodDbEnsure,
|
||||
);
|
||||
const removedOpenFgaEnsure = runCommand(["bun", "scripts/cli.ts", "hwlab", "nodes", "secret", "ensure", "--node", "G14", "--lane", "v03", "--name", "hwlab-v03-openfga", "--dry-run"], process.cwd(), { timeoutMs: 30_000 });
|
||||
assertCondition(
|
||||
removedOpenFgaEnsure.exitCode !== 0
|
||||
|
||||
Reference in New Issue
Block a user