arch: register enterprise four-domain work body
This commit is contained in:
parent
d563e6fd73
commit
729060de2a
7 changed files with 203 additions and 3 deletions
|
|
@ -0,0 +1,41 @@
|
|||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import test from "node:test";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import path from "node:path";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const map = JSON.parse(fs.readFileSync(path.join(root, "routing/hololake-enterprise-four-domain-work-channel.json"), "utf8"));
|
||||
const current = JSON.parse(fs.readFileSync(path.join(root, "routing/hololake-current-architecture.json"), "utf8"));
|
||||
|
||||
test("enterprise lighthouse does not preclaim physical Guanghu OS", () => {
|
||||
assert.equal(map.enterprise_node.reimage_now, false);
|
||||
assert.equal(map.enterprise_node.physical_guanghu_os_master_claimed, false);
|
||||
assert.equal(map.enterprise_node.arbitrary_remote_shell_exposed_to_client, false);
|
||||
});
|
||||
|
||||
test("identity authority cannot be captured by a work repository", () => {
|
||||
assert.equal(map.authority_registry.inside_operator_work_repository, false);
|
||||
assert.equal(map.authority_registry.duplicate_writable_copies_in_zero_sense_repositories, false);
|
||||
assert.equal(map.authority_registry.operator_repositories_can_mutate_registry, false);
|
||||
});
|
||||
|
||||
test("five private repositories preserve zero-sense dual control", () => {
|
||||
assert.equal(map.repositories.length, 5);
|
||||
assert.equal(map.repositories.filter((repo) => repo.domain === "DOMAIN-ZS").length, 2);
|
||||
assert.ok(map.repositories.every((repo) => repo.private));
|
||||
assert.equal(map.zero_sense_dual_control.constitutional_actions_require_both, true);
|
||||
});
|
||||
|
||||
test("routing and credentials preserve the two gates", () => {
|
||||
assert.equal(map.entry_route.number_before_credentials, true);
|
||||
assert.equal(map.entry_route.domain_chosen_by_user, false);
|
||||
assert.equal(map.entry_route.enterprise_work_entry_channel, "GUANGHU_CHANNEL");
|
||||
assert.equal(map.credentials.shared_initial_password_allowed, false);
|
||||
assert.equal(map.credentials.forced_change_before_workspace, true);
|
||||
});
|
||||
|
||||
test("current architecture registers the enterprise work body", () => {
|
||||
assert.equal(current.enterprise_four_domain_work_channel.record_id, map.record_id);
|
||||
assert.equal(current.enterprise_four_domain_work_channel.machine_projection, "routing/hololake-enterprise-four-domain-work-channel.json");
|
||||
});
|
||||
Loading…
Reference in a new issue