feat: normalize deployment inventory evidence

This commit is contained in:
NuklearRabbit
2026-07-29 17:39:22 +02:00
parent 6b93391a9b
commit 5d3731a853
13 changed files with 433 additions and 45 deletions
+16
View File
@@ -1064,6 +1064,22 @@ test("linked Compose deployments retain the existing project, files and service
assert.deepEqual(service.deploymentServices(profile, repository), ["api", "worker"]);
});
test("inventory scan uses only configured roots and reports partial find failures", () => {
const service = new UnraidDeploymentService({ store: {}, ssh: {}, git: {} });
const script = service.inventoryScript({
basePath: "/mnt/user/appdata",
scanRoots: ["/mnt/user/appdata", "/mnt/cache/custom apps"],
scanExcludes: ["archive-*", "scratch"],
});
assert.match(script, /add_scan_root '\/mnt\/user\/appdata'/);
assert.match(script, /add_scan_root '\/mnt\/cache\/custom apps'/);
assert.match(script, /-name 'archive-\*'/);
assert.match(script, /-name 'scratch'/);
assert.match(script, /Inventory scan partially failed/);
assert.match(script, /2>"\$scan_error" \|\| true/);
assert.doesNotMatch(script, /add_scan_root \/mnt\/cache\/appdata/);
});
test("push bundle activation validates Compose and services before promoting current SHA", () => {
const service = new UnraidDeploymentService({ store: {}, ssh: {}, git: {} });
const repository = { name: "OmniRoute", fullName: "Jens/OmniRoute" };