From cbf697bcd59e035125c8bed77ffd0ef602bce21f Mon Sep 17 00:00:00 2001 From: funman300 Date: Mon, 17 Aug 2026 22:05:15 +0000 Subject: [PATCH] launcher: make the shadowed-hostname preflight test machine-independent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new hook-config check warns when the deployed openfut.cfg disagrees with the configured server, and this test counts warnings across every check. On the game machine — which by definition has a hook deployed — that second warning broke the assertion. Caught by running the suite on .105 rather than only on the server host. Pins the game dir for the same reason the tools dir is pinned. --- src/preflight.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/preflight.rs b/src/preflight.rs index 06a0c61..ba09afa 100644 --- a/src/preflight.rs +++ b/src/preflight.rs @@ -408,9 +408,13 @@ mod tests { c.openfut_server_host = "127.0.0.2".into(); c.ea_hostnames = vec!["localhost".into()]; c.fifa17_tools_dir = "/nonexistent/openfut-tools".into(); + // Machine-independence: this counts warnings across every check, so the + // game dir must not be a real one. A box with a hook deployed (the game + // machine always has one) would otherwise add a drift warning here. + c.fifa_game_dir = "/nonexistent/fifa-game-dir".into(); let checks = run(&c); assert_eq!(failures(&checks), 0, "must not be reported as fatal"); - assert_eq!(warnings(&checks), 1); + assert_eq!(warnings(&checks), 1, "{checks:#?}"); } #[test]