From e55633510228c167ea13c5d6094053adad5651b0 Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Fri, 7 Aug 2026 15:58:16 +0200 Subject: [PATCH] test(cli): pin the exact wait-line layout instead of substring checks --- crates/xy/src/cli/format.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/xy/src/cli/format.rs b/crates/xy/src/cli/format.rs index 10aacaf..392a999 100644 --- a/crates/xy/src/cli/format.rs +++ b/crates/xy/src/cli/format.rs @@ -36,7 +36,7 @@ pub(crate) fn wait_line(info: &WaitInfo) -> String { #[cfg(test)] mod tests { use super::*; - use xy_protocol::{ServerState, rpc::WaitInfo}; + use xy_protocol::ServerState; #[test] fn list_renders_the_waiting_state() { @@ -65,11 +65,9 @@ mod tests { let out = wait_line(&info); - assert!( - out.contains("path /Users/me/.orbstack/run/docker.sock"), - "got: {out}" + assert_eq!( + out, + " wait-for: path /Users/me/.orbstack/run/docker.sock\n 43s elapsed, timeout 120s\n" ); - assert!(out.contains("43s elapsed"), "got: {out}"); - assert!(out.contains("timeout 120s"), "got: {out}"); } }