summaryrefslogtreecommitdiffstats
path: root/test/vpp_qemu_utils.py
diff options
context:
space:
mode:
authoradrianvillin <avillin@cisco.com>2023-11-08 15:17:14 +0100
committerDave Wallace <dwallacelf@gmail.com>2023-11-08 20:36:49 +0000
commit098ee3aaf1747feb913a42ada4b61868a0d5f644 (patch)
tree452b08b1cbd9d2323a280f1541a034f66a39ac66 /test/vpp_qemu_utils.py
parente59761f721f8a667a03e0c505b287bf69c47b532 (diff)
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>
Diffstat (limited to 'test/vpp_qemu_utils.py')
-rw-r--r--test/vpp_qemu_utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/vpp_qemu_utils.py b/test/vpp_qemu_utils.py
index e7e21a01b73..3a8fdc8daf5 100644
--- a/test/vpp_qemu_utils.py
+++ b/test/vpp_qemu_utils.py
@@ -216,12 +216,16 @@ def disable_interface_gso(namespace, interface):
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(