Files
galaxy/app/src/remote_server/ssh_transport_tests.rs
T

28 lines
724 B
Rust

use warpui::r#async::BoxFuture;
use super::*;
fn static_auth_context() -> Arc<RemoteServerAuthContext> {
Arc::new(RemoteServerAuthContext::new(
|| -> BoxFuture<'static, Option<String>> { Box::pin(async { None }) },
|| "user id/with spaces".to_string(),
String::new(),
String::new(),
true,
))
}
#[test]
fn remote_proxy_command_quotes_identity_key() {
let transport = SshTransport::new(
PathBuf::from("/tmp/control-master.sock"),
static_auth_context(),
true,
);
let command = transport.remote_proxy_command();
assert!(command.contains("remote-server-proxy --identity-key"));
assert!(command.contains("'user id/with spaces'"));
}