async fn cli_wait_server_status( endpoint: &str, expected_status: ServerStatusLegacy, ) -> Result<()>