From 6546f77f4bb57072027944004bffdd20a7782c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Fri, 8 Nov 2024 15:38:58 +0100 Subject: [PATCH] Remove unused test --- talpid-wireguard/src/wireguard_go/mod.rs | 30 ------------------------ 1 file changed, 30 deletions(-) diff --git a/talpid-wireguard/src/wireguard_go/mod.rs b/talpid-wireguard/src/wireguard_go/mod.rs index 11c5adf1d46a..39b23a185aeb 100644 --- a/talpid-wireguard/src/wireguard_go/mod.rs +++ b/talpid-wireguard/src/wireguard_go/mod.rs @@ -486,36 +486,6 @@ impl Tunnel for WgGoTunnel { } } -#[cfg(daita)] -fn load_maybenot_machines(resource_dir: &Path) -> Result { - let path = resource_dir.join("maybenot_machines"); - log::debug!("Reading maybenot machines from {}", path.display()); - - let machines = fs::read_to_string(path).map_err(|e| TunnelError::StartDaita(Box::new(e)))?; - let machines = CString::new(machines).map_err(|e| TunnelError::StartDaita(Box::new(e)))?; - Ok(machines) -} - -#[cfg(test)] -mod test { - /// Test whether `maybenot_machines` in dist-assets contains valid machines. - /// TODO: Remove when switching to dynamic machines. - #[cfg(daita)] - #[test] - fn test_load_maybenot_machines() { - use super::load_maybenot_machines; - use std::path::PathBuf; - - let dist_assets = std::env::var("CARGO_MANIFEST_DIR") - .map(PathBuf::from) - .expect("CARGO_MANIFEST_DIR env var not set") - .join("..") - .join("dist-assets"); - let machines = load_maybenot_machines(&dist_assets).unwrap(); - wireguard_go_rs::validate_maybenot_machines(&machines).unwrap(); - } -} - mod stats { use super::{Stats, StatsMap};