From 5ca7760fdda8e6d910b77f00e9e4aa5ef8d17acf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 11:06:25 +0200 Subject: [PATCH] WIP B3: pin route admission past the gate --- src/control_plane.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/control_plane.rs b/src/control_plane.rs index b1c2131..5d52938 100644 --- a/src/control_plane.rs +++ b/src/control_plane.rs @@ -13905,13 +13905,21 @@ mod tests { #[test] fn route_admission_gets_past_its_gate_without_reading_odin() -> Result<()> { + // The step below would run the host's real nginx, so it only runs + // where there is none. + if Path::new("/usr/sbin/nginx").exists() { + return Ok(()); + } let routed = routed_world(Odin::Unreachable, 1, DeploymentPhase::Fencing, false)?; routed.stub.set_state("active"); routed.run_to_routing()?; - // The host's nginx is not here, so the step fails at installing the - // route: past the admission gate, which would have failed on Odin. + // The step fails at installing the route: past the admission gate, + // which would have failed on Odin. let failure = format!("{:#}", routed.step().expect_err("no nginx in the test world")); - assert!(failure.contains("XXXX"), "{failure}"); + assert!( + failure.contains("starting route actuator /usr/sbin/nginx"), + "{failure}" + ); routed.assert_odin_untouched()?; Ok(()) }