Skip to content

Commit

Permalink
make sure the test runs only on unix like OS's
Browse files Browse the repository at this point in the history
  • Loading branch information
twitzelbos authored and yodaldevoid committed Sep 21, 2023
1 parent 34c3b14 commit 0111706
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/all/channel.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use ssh2::Channel;
use std::io::prelude::*;
use std::net::{TcpListener, TcpStream};
use std::os::unix::net::UnixListener;
use std::thread;

/// Consume all available stdout and stderr data.
Expand Down Expand Up @@ -171,8 +170,11 @@ fn direct() {
t.join().ok().unwrap();
}

#[cfg(all(unix))]
#[test]
fn direct_stream_local() {
use std::os::unix::net::UnixListener;

let d = tempfile::tempdir().unwrap();
let path = d.path().join("ssh2-rs-test.sock");
let a = UnixListener::bind(&path).unwrap();
Expand Down

0 comments on commit 0111706

Please sign in to comment.