diff options
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() {} |