mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
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:
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user