I have situation, where test server running on localhost and could be offline on production/not accessible for github workflow:
#[test]
fn _new() {
let host = "127.0.0.1";
let port = 4321;
let mut client = Client::new(host, port).unwrap();
assert_eq!(
serde_json::from_str::<Response>(&client.status().unwrap())
.unwrap()
.online,
true
);
}
But I want keep this test, because using it locally. Suppose some attribute maybe exist to skip/silentize it until I provide CLI flag e.g. cargo test -- --connection-test