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>
(cherry picked from commit e79bff701a)
This commit is contained in:
Rodrigo Campos
2026-06-17 13:24:14 +02:00
committed by Rodrigo Campos Catelin
parent 591db7d0ca
commit cc0c204adb
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() {