add test case for missing netns

Change-Id: Ib26183b9234b7c8f552b74d1bdac63c794966442
This commit is contained in:
Mohammed Naser 2020-09-07 08:56:49 -04:00
parent 12a27195a8
commit 00453b2fe4
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ def get_pid_files(state_path):
def verify_router_configured(router_id, master):
"""Verify is the router is properly configured on the system."""
namespace = NetNS('qrouter-%s' % router_id)
try:
namespace = NetNS('qrouter-%s' % router_id)
except OSError:
return 0
for link in namespace.get_links():
name = link.get_attr('IFLA_IFNAME')