From 143457cec199e0d0e184aa32d496f03a8c2e8934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Fri, 7 Aug 2026 15:32:07 +0800 Subject: [PATCH] test(os): cover recovery and private-network gates --- .../crates/hldp-runtime/tests/world_manifest.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/product-source/hololake-platform/guanghu-os/crates/hldp-runtime/tests/world_manifest.rs b/product-source/hololake-platform/guanghu-os/crates/hldp-runtime/tests/world_manifest.rs index f49e81b..f7e24f0 100644 --- a/product-source/hololake-platform/guanghu-os/crates/hldp-runtime/tests/world_manifest.rs +++ b/product-source/hololake-platform/guanghu-os/crates/hldp-runtime/tests/world_manifest.rs @@ -349,6 +349,13 @@ fn rejects_unregistered_schema_continuity_and_native_exit_contracts() { .to_string() .contains("GHNRP")); + let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse"); + manifest.native_recovery.beacon_sector_count = 1; + assert!(validate_world_manifest(&manifest) + .expect_err("the recovery beacon must remain exactly two sectors") + .to_string() + .contains("1024-byte beacon")); + let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse"); manifest.native_recovery.beacon_lba_start = 67; assert!(validate_world_manifest(&manifest) @@ -356,6 +363,13 @@ fn rejects_unregistered_schema_continuity_and_native_exit_contracts() { .to_string() .contains("GHNLP extents")); + let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse"); + manifest.native_network.public_nat_address_recorded_in_world = true; + assert!(validate_world_manifest(&manifest) + .expect_err("public NAT addressing must not enter the world manifest") + .to_string() + .contains("private virtio facts")); + let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse"); manifest.persona_birth.persona_state = "BORN".to_owned(); assert!(validate_world_manifest(&manifest)