mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
The current Rust workspace isn't as consistent as it could be. To make navigation a bit easier, we move a few crates around. Generally, we follow the idea that entry-points should be at the top-level. `rust/` now looks like this (directories only): ``` . ├── cli # Firezone CLI ├── client-ffi # Entry point for Apple & Android ├── gateway # Gateway ├── gui-client # GUI client ├── headless-client # Headless client ├── libs # Library crates ├── relay # Relay ├── target # Compile artifacts ├── tests # Crates for testing └── tools # Local tools ``` To further enforce this structure, we also drop the `firezone-` prefix from all crates that are not top-level binary crates.
19 lines
692 B
Rust
19 lines
692 B
Rust
#![allow(clippy::unwrap_used)]
|
|
|
|
use bin_shared::TunDeviceManager;
|
|
|
|
/// Checks for regressions in issue #4765, un-initializing Wintun
|
|
/// Redundant but harmless on Linux.
|
|
#[tokio::test] // Needs a runtime.
|
|
#[ignore = "Needs admin / sudo and Internet"]
|
|
async fn tunnel_drop() {
|
|
logging::test_global("debug"); // `Tun` uses threads and we want to see the logs of all threads.
|
|
|
|
let mut tun_device_manager = TunDeviceManager::new(1280).unwrap();
|
|
|
|
// Each cycle takes about half a second, so this will take a fair bit to run.
|
|
for _ in 0..50 {
|
|
let _tun = tun_device_manager.make_tun().unwrap(); // This will panic if we don't correctly clean-up the wintun interface.
|
|
}
|
|
}
|