Fix topo check when no hosts have benn discovered yet
Change-Id: I355c88e530270ea0a6394c8134536abb9bd6d97b
(cherry picked from commit af39dcc229914215b750fe27e88314c50a2a9a78)
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 340df87..70609d3 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -2179,6 +2179,8 @@
currentHostsResult = main.Mininet1.compareHosts(
mnHosts,
hosts[ controller ] )
+ elif hosts[ controller ] == []:
+ currentHostsResult = main.TRUE
else:
currentHostsResult = main.FALSE
utilities.assert_equals( expect=main.TRUE,
@@ -2291,7 +2293,7 @@
consistentHostsResult = main.TRUE
for controller in range( len( hosts ) ):
controllerStr = str( controller + 1 )
- if hosts[ controller ] and "Error" not in hosts[ controller ]:
+ if hosts[ controller ] is not None and "Error" not in hosts[ controller ]:
if hosts[ controller ] == hosts[ 0 ]:
continue
else: # hosts not consistent