forked from mtusi2026/mtusi2026lab3
Prepare verified laboratory 3 implementation and evidence
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { resolve } from "node:path";
|
||||
const root = resolve(import.meta.dir, "..");
|
||||
const before = await Bun.file(
|
||||
resolve(root, "evidence/k3s/restart-before.json"),
|
||||
).json();
|
||||
const after = await Bun.file(
|
||||
resolve(root, "evidence/k3s/restart-after.json"),
|
||||
).json();
|
||||
if (
|
||||
!before.run_id ||
|
||||
before.run_id !== after.run_id ||
|
||||
!Array.isArray(before.pods) ||
|
||||
!before.pods.length ||
|
||||
!Array.isArray(after.pods) ||
|
||||
!after.pods.length
|
||||
)
|
||||
throw new Error("Incomplete or mismatched restart evidence");
|
||||
if (after.pods.some((p: any) => before.pods.some((b: any) => b.uid === p.uid)))
|
||||
throw new Error(
|
||||
"Restart returned while an original workload Pod UID still existed",
|
||||
);
|
||||
console.log("PASS: every recorded original workload Pod UID was replaced");
|
||||
Reference in New Issue
Block a user