WIP B3: pin route admission past the gate

This commit is contained in:
Meta Vens 2026-09-29 11:06:25 +02:00
commit 5ca7760fdd

View file

@ -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(())
}