From cc0c204adb354f32f2f5a85480ff85b3ccef2d9d Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Wed, 17 Jun 2026 13:24:14 +0200 Subject: [PATCH] tests: Unset ns_path when deleting the netns The cleaning is condition on this variable being set. So let's unset it after we clean the resources. Signed-off-by: Rodrigo Campos (cherry picked from commit e79bff701ad04fc107933464a1be3eb768272887) --- tests/integration/checkpoint.bats | 3 +++ tests/integration/netdev.bats | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/integration/checkpoint.bats b/tests/integration/checkpoint.bats index 7541e4caa..2e51ff7d6 100644 --- a/tests/integration/checkpoint.bats +++ b/tests/integration/checkpoint.bats @@ -30,6 +30,9 @@ function delete_netns() { # Delete the namespace only if the ns_name variable is set. [ -v ns_name ] && ip netns del "$ns_name" + + unset ns_name + unset ns_path } function setup() { diff --git a/tests/integration/netdev.bats b/tests/integration/netdev.bats index 6dddbab07..25b36e5d5 100644 --- a/tests/integration/netdev.bats +++ b/tests/integration/netdev.bats @@ -20,6 +20,9 @@ function setup_netns() { function delete_netns() { # Delete the namespace only if the ns_name variable is set. [ -v ns_name ] && ip netns del "$ns_name" + + unset ns_name + unset ns_path } function setup() {