tests: Fix http static test failing on retry
- test_http_static.py: If namespace creation fails, try to delete the namespace and create it again
- vpp_qemu_utils.py: Added "isinstance()" to "delete_namespace()" to match "create_namespace()"
Type: test
Change-Id: I88ff7a36f5d52816fee16283efba6af025496491
Signed-off-by: adrianvillin <avillin@cisco.com>
diff --git a/test/vpp_qemu_utils.py b/test/vpp_qemu_utils.py
index e7e21a0..3a8fdc8 100644
--- a/test/vpp_qemu_utils.py
+++ b/test/vpp_qemu_utils.py
@@ -216,12 +216,16 @@
raise Exception("Error disabling gso:", e.output)
-def delete_namespace(namespaces):
+def delete_namespace(ns):
"""delete one or more namespaces.
arguments:
namespaces -- a list of namespace names
"""
+ if isinstance(ns, str):
+ namespaces = [ns]
+ else:
+ namespaces = ns
try:
for namespace in namespaces:
result = subprocess.run(