mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
test(ql3): compact cutover evidence output
This commit is contained in:
@@ -64,7 +64,7 @@ container_name "$target_name" || fail 'target container name is invalid'
|
|||||||
valid_digest "$sqlite_plan_digest" || fail 'reviewed SQLite plan digest is invalid'
|
valid_digest "$sqlite_plan_digest" || fail 'reviewed SQLite plan digest is invalid'
|
||||||
valid_digest "$directory_plan_digest" || fail 'reviewed data-directory plan digest is invalid'
|
valid_digest "$directory_plan_digest" || fail 'reviewed data-directory plan digest is invalid'
|
||||||
[ "$(uname -s)" = Linux ] || fail 'cutover rehearsal requires a Linux Docker host'
|
[ "$(uname -s)" = Linux ] || fail 'cutover rehearsal requires a Linux Docker host'
|
||||||
for tool in docker sha256sum grep sed stat date realpath; do
|
for tool in docker sha256sum grep sed stat date realpath tr; do
|
||||||
command -v "$tool" >/dev/null 2>&1 || fail "$tool is required"
|
command -v "$tool" >/dev/null 2>&1 || fail "$tool is required"
|
||||||
done
|
done
|
||||||
docker_socket=$(realpath /var/run/docker.sock)
|
docker_socket=$(realpath /var/run/docker.sock)
|
||||||
@@ -281,7 +281,8 @@ run_deploy cutover-target-stop target-stop.json target-stop.result.json
|
|||||||
printf '%s' 'QingLong Local Alpha target-stop result: ' >&2
|
printf '%s' 'QingLong Local Alpha target-stop result: ' >&2
|
||||||
sed -n '1p' "$rehearsal_root/results/target-stop.result.json" >&2
|
sed -n '1p' "$rehearsal_root/results/target-stop.result.json" >&2
|
||||||
printf '%s' 'QingLong Local Alpha target-stop evidence: ' >&2
|
printf '%s' 'QingLong Local Alpha target-stop evidence: ' >&2
|
||||||
sed -n '1p' "$rehearsal_root/service/cutovers/alpha-upgrade-cutover/0006-target-stop-outcome.json" >&2
|
tr -d '\n' <"$rehearsal_root/service/cutovers/alpha-upgrade-cutover/0006-target-stop-outcome.json" >&2
|
||||||
|
printf '\n' >&2
|
||||||
grep -q '"reconciliation":"rollback_candidate"' "$rehearsal_root/results/target-stop.result.json" || fail 'target stop did not produce a clean rollback candidate'
|
grep -q '"reconciliation":"rollback_candidate"' "$rehearsal_root/results/target-stop.result.json" || fail 'target stop did not produce a clean rollback candidate'
|
||||||
[ "$(sha256sum "$legacy_root/db/database.sqlite" | sed 's/ .*//')" = "$legacy_sha256" ] || fail 'legacy database changed during rehearsal'
|
[ "$(sha256sum "$legacy_root/db/database.sqlite" | sed 's/ .*//')" = "$legacy_sha256" ] || fail 'legacy database changed during rehearsal'
|
||||||
|
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ test('materializes and offline-audits one closed two-image trial kit', (t) => {
|
|||||||
cutoverRehearsalContents,
|
cutoverRehearsalContents,
|
||||||
/QingLong Local Alpha target-stop evidence:/,
|
/QingLong Local Alpha target-stop evidence:/,
|
||||||
);
|
);
|
||||||
|
assert.match(cutoverRehearsalContents, /tr -d '\\n'/);
|
||||||
const report = auditLocalAlphaTrialKit({ bundleRoot: paths.outputRoot });
|
const report = auditLocalAlphaTrialKit({ bundleRoot: paths.outputRoot });
|
||||||
assert.equal(report.compatible, true);
|
assert.equal(report.compatible, true);
|
||||||
assert.equal(report.sourceRevision, revision);
|
assert.equal(report.sourceRevision, revision);
|
||||||
|
|||||||
Reference in New Issue
Block a user