diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-10-06 13:33:15 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-10-06 13:33:15 +0200 |
commit | c82d3e554ba34305fa7ef759c830a74f4ba9559b (patch) | |
tree | 44081e90a68dedeaabc1252779df81249f92ce7f /src/main.rs | |
parent | Added key_confirmed callback (diff) | |
download | wireguard-rs-c82d3e554ba34305fa7ef759c830a74f4ba9559b.tar.xz wireguard-rs-c82d3e554ba34305fa7ef759c830a74f4ba9559b.zip |
Restructure dummy implementations
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 26b39a2..6133884 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,24 @@ mod timers; mod types; mod wireguard; -#[test] -fn test_pure_wireguard() {} +#[cfg(test)] +mod tests { + use crate::types::{dummy, Bind}; + use crate::wireguard::Wireguard; + + use std::thread; + use std::time::Duration; + + fn init() { + let _ = env_logger::builder().is_test(true).try_init(); + } + + #[test] + fn test_pure_wireguard() { + init(); + let wg = Wireguard::new(dummy::TunTest::new(), dummy::VoidBind::new()); + thread::sleep(Duration::from_millis(500)); + } +} fn main() {} |