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 <rodrigo@amutable.com>
This commit is contained in:
Rodrigo Campos
2026-06-17 13:24:14 +02:00
parent b16ed9a0b8
commit e79bff701a
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -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() {
+3
View File
@@ -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() {