You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
distant/distant-ssh2/tests/ssh2/ssh.rs

20 lines
473 B
Rust

use crate::sshd::*;
use distant_ssh2::{Ssh, SshFamily};
use rstest::*;
#[rstest]
#[tokio::test]
async fn detect_family_should_return_windows_if_sshd_on_windows(#[future] ssh: Ctx<Ssh>) {
let ssh = ssh.await;
let family = ssh.detect_family().await.expect("Failed to detect family");
assert_eq!(
family,
if cfg!(windows) {
SshFamily::Windows
} else {
SshFamily::Unix
},
"Got wrong family"
);
}