fix(deploy): validate lighthouse acceptance URL
This commit is contained in:
parent
df3012bad2
commit
eebfc790fe
3 changed files with 14 additions and 4 deletions
|
|
@ -93,21 +93,25 @@ ReadWritePaths=/var/lib/guanghu/lake-lamp-authz -/var/lib/guanghu/deployment-eve
|
|||
);
|
||||
});
|
||||
|
||||
test("AI discovery update package declares all four route maps and passes the existing-service policy", () => {
|
||||
test("AI discovery lighthouse update package passes the exact existing-service policy", () => {
|
||||
const root = path.resolve(__dirname, "../..");
|
||||
const request = JSON.parse(fs.readFileSync(path.join(root, "deployment", "requests", "AI-DISCOVERY-ICE-P-ROUTE-20260727.json")));
|
||||
const request = JSON.parse(fs.readFileSync(path.join(root, "deployment", "requests", "AI-DISCOVERY-LIGHTHOUSE-HOST-NAV-20260807.json")));
|
||||
const checked = validateManifest(request, { requestId: request.request_id, commit });
|
||||
assert.equal(checked.kind, "existing-service-update");
|
||||
assert.deepEqual(checked.files.map(item => item.destination), [
|
||||
"server.js",
|
||||
"public-navigation-anchor.json",
|
||||
"repository-route-map.json",
|
||||
"server-node-map.json",
|
||||
"fifth-domain-subject-registry.json",
|
||||
"subject-id-alias-map.json",
|
||||
"ai-machine-navigation-map.json",
|
||||
"lighthouse-path-registry.json",
|
||||
"host-skill-navigation-map.json",
|
||||
]);
|
||||
const unit = fs.readFileSync(path.join(root, request.unit_source), "utf8");
|
||||
assert.equal(validateUpdateUnit(unit, request.module.run_user, request.module.install_root), unit);
|
||||
for (const variable of ["GUANGHU_REPOSITORY_MAP", "GUANGHU_NODE_MAP", "GUANGHU_SUBJECT_REGISTRY", "GUANGHU_SUBJECT_ALIAS_MAP"]) {
|
||||
for (const variable of ["GUANGHU_REPOSITORY_MAP", "GUANGHU_NODE_MAP", "GUANGHU_SUBJECT_REGISTRY", "GUANGHU_SUBJECT_ALIAS_MAP", "GUANGHU_NAVIGATION_MAP", "GUANGHU_NAVIGATION_ANCHOR", "GUANGHU_LIGHTHOUSE_PATHS", "GUANGHU_HOST_SKILLS"]) {
|
||||
assert.match(unit, new RegExp(`^Environment=${variable}=`, "m"));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue