From 2f985073dbae79342a4510ed86ea2c2862de7600 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Tue, 26 Sep 2023 18:18:30 +0200 Subject: [PATCH] Require namespace tests to succeed --- tests/net_without_seccomp.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/net_without_seccomp.rs b/tests/net_without_seccomp.rs index a105b41..0be236e 100644 --- a/tests/net_without_seccomp.rs +++ b/tests/net_without_seccomp.rs @@ -43,17 +43,10 @@ fn main() { seccompiler::apply_filter(&program).unwrap(); let birdcage = Birdcage::new().unwrap(); - let result = birdcage.lock(); + birdcage.lock().unwrap(); - match result { - // Namespaces are supported, so networking should still be blocked. - Ok(_) => { - let result = TcpStream::connect("8.8.8.8:443"); - assert!(result.is_err()); - }, - // Namespaces aren't supported, so failure is desired. - Err(_) => (), - } + let result = TcpStream::connect("8.8.8.8:443"); + assert!(result.is_err()); } #[cfg(not(target_os = "linux"))]