Initial curated Unraid-AppOps-Gateway source from 3bd6f6fee310125bfbb4d4650389a817f498724d

This commit is contained in:
Public Source Publisher committed 2026-10-01 01:35:57 +02:00
commit 1dfbca08a1
528 files changed
+131054

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import type { ActionPlan } from "@/types/appops";
import { buildCommandPreflightRequest } from "./commandPreflight.ts";
const plan: ActionPlan = {
intent: "container.restart",
target: "widefrog",
source: "manual",
risk: "medium",
policy: "allowed",
reason: "Operator requested restart.",
plan: ["Check health", "Restart container"],
postChecks: ["Container healthy"],
};
describe("buildCommandPreflightRequest", () => {
it("uses the current command plan as the preflight source", () => {
assert.deepEqual(buildCommandPreflightRequest(plan), {
action: "container.restart",
target: "widefrog",
source: "manual",
});
});
});