fix: 修复外部 PostgreSQL 迁移 Job 不可变漂移

This commit is contained in:
root
2026-07-22 00:02:54 +02:00
parent 2c7e867c74
commit 77b1a6784f
2 changed files with 17 additions and 7 deletions
+4 -1
View File
@@ -762,7 +762,10 @@ test("v03 render keeps node identity as data instead of generated structure", as
assert.match(externalPostgresMigrationConfig?.data?.["run.mjs"] ?? "", /uselibpqcompat/u);
assert.match(externalPostgresMigrationConfig?.data?.["run.mjs"] ?? "", /hwlab-runtime-migration-started/u);
assert.equal(externalPostgresMigrationConfig?.metadata?.annotations?.["argocd.argoproj.io/sync-wave"], "-2");
assert.equal(externalPostgresMigrationJob?.metadata?.annotations?.["argocd.argoproj.io/sync-wave"], "-1");
assert.equal(externalPostgresMigrationJob?.metadata?.annotations?.["argocd.argoproj.io/sync-wave"], "1");
assert.equal(externalPostgresMigrationJob?.metadata?.annotations?.["hwlab.pikastech.local/migration-contract-version"], "external-postgres-migration-v2");
assert.equal(externalPostgresMigrationJob?.metadata?.labels?.["hwlab.pikastech.local/source-commit"], sourceRevision);
assert.equal(externalPostgresMigrationJob?.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/source-commit"], undefined);
assert.equal(
externalPostgresMigrationJob?.spec?.template?.spec?.containers?.[0]?.image,
`127.0.0.1:5000/hwlab/hwlab-cloud-api-env@sha256:${"1".repeat(64)}`