summaryrefslogtreecommitdiffstats
path: root/test/vpp_qemu_utils.py
diff options
context:
space:
mode:
authoradrianvillin <avillin@cisco.com>2023-10-24 12:53:10 +0200
committerDave Wallace <dwallacelf@gmail.com>2023-10-30 21:17:56 +0000
commit30f2600dcf143baaff845570086b8498c01e29ee (patch)
tree541f9abd13da741afab5e5e6e884cdca87a247cb /test/vpp_qemu_utils.py
parentc78eeaba49cba55a5e4c18aad1bd41e4c9b3aa33 (diff)
tests: Added http static server tests.
Coverage increased from 21% to 80% Type: test Change-Id: Ic8ecc620cef738d7dbe4c259f58a373ac155a588 Signed-off-by: adrianvillin <avillin@cisco.com>
Diffstat (limited to 'test/vpp_qemu_utils.py')
-rw-r--r--test/vpp_qemu_utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/vpp_qemu_utils.py b/test/vpp_qemu_utils.py
index cb1a0dd9f4c..e7e21a01b73 100644
--- a/test/vpp_qemu_utils.py
+++ b/test/vpp_qemu_utils.py
@@ -6,11 +6,10 @@ import subprocess
import sys
-def can_create_namespaces():
+def can_create_namespaces(namespace="vpp_chk_4212"):
"""Check if the environment allows creating the namespaces"""
try:
- namespace = "vpp_chk_4212"
result = subprocess.run(["ip", "netns", "add", namespace], capture_output=True)
if result.returncode != 0:
return False
@@ -18,7 +17,7 @@ def can_create_namespaces():
if result.returncode != 0:
return False
return True
- except:
+ except Exception:
return False