test(cli): pin the exact wait-line layout instead of substring checks
This commit is contained in:
@@ -36,7 +36,7 @@ pub(crate) fn wait_line(info: &WaitInfo) -> String {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use xy_protocol::{ServerState, rpc::WaitInfo};
|
use xy_protocol::ServerState;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn list_renders_the_waiting_state() {
|
fn list_renders_the_waiting_state() {
|
||||||
@@ -65,11 +65,9 @@ mod tests {
|
|||||||
|
|
||||||
let out = wait_line(&info);
|
let out = wait_line(&info);
|
||||||
|
|
||||||
assert!(
|
assert_eq!(
|
||||||
out.contains("path /Users/me/.orbstack/run/docker.sock"),
|
out,
|
||||||
"got: {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}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user