feat(world): establish Guanghu Era five-domain boundaries
This commit is contained in:
parent
1f6134fe63
commit
4b8333e459
38 changed files with 2178 additions and 446 deletions
|
|
@ -20,14 +20,14 @@ class LanguageSystemTests(unittest.TestCase):
|
|||
private = base / "private"
|
||||
public = base / "public"
|
||||
MODULE.build(ROOT / "system/fifth-domain-system.json", private, "fifth-domain")
|
||||
MODULE.build(ROOT / "system/public-four-domain-template.json", public, "public-four-domain")
|
||||
MODULE.build(ROOT / "system/public-four-domain-template.json", public, "enterprise-four-domain")
|
||||
self.assertEqual(MODULE.verify(private)["outcome"], "PASS")
|
||||
self.assertEqual(MODULE.verify(public)["outcome"], "PASS")
|
||||
self.assertEqual(len(list(public.glob("*/NODE.json"))), 4)
|
||||
|
||||
def test_public_private_marker_rejected(self):
|
||||
value = MODULE.load_json(ROOT / "system/public-four-domain-template.json")
|
||||
value["responsible_human"] = "ICE-GL∞"
|
||||
value["responsible_human_members"] = "ICE-GL∞"
|
||||
with self.assertRaisesRegex(ValueError, "private markers leaked"):
|
||||
MODULE.validate_public(value)
|
||||
|
||||
|
|
@ -37,8 +37,8 @@ class LanguageSystemTests(unittest.TestCase):
|
|||
PUBLIC_MODULE.build(ROOT / "system/public-four-domain-template.json", output)
|
||||
self.assertEqual(PUBLIC_MODULE.verify(output)["outcome"], "PASS")
|
||||
value = MODULE.load_json(ROOT / "system/public-four-domain-template.json")
|
||||
value["responsible_human"] = "ICE-PRIVATE"
|
||||
with self.assertRaisesRegex(ValueError, "unbound|private"):
|
||||
value["responsible_human_members"] = "ICE-PRIVATE"
|
||||
with self.assertRaisesRegex(ValueError, "pending|private"):
|
||||
PUBLIC_MODULE.validate(value)
|
||||
|
||||
def test_tamper_rejected(self):
|
||||
|
|
@ -59,6 +59,15 @@ class LanguageSystemTests(unittest.TestCase):
|
|||
)
|
||||
self.assertEqual(result["outcome"], "PASS")
|
||||
self.assertEqual(result["yaoming_current_id"], "ICE-BB-0001")
|
||||
self.assertEqual(result["guanghu_team_reality_controller"], True)
|
||||
self.assertEqual(result["hololake_embeds_enterprise_domains"], False)
|
||||
|
||||
def test_enterprise_portal_and_private_fifth_domain_stay_separate(self):
|
||||
value = MODULE.load_json(ROOT / "system/public-four-domain-template.json")
|
||||
self.assertEqual(value["carrier"], "ENTERPRISE_PORTAL")
|
||||
self.assertFalse(value["embedded_in_hololake"])
|
||||
self.assertFalse(value["fifth_domain"]["embedded"])
|
||||
self.assertFalse(next(item for item in value["domains"] if item["id"] == "DOMAIN-ZS")["public_access"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Reference in a new issue