Fix the SCPFscaleTopo test CASE100 no_assert
Fix Driver function onosStop(), add "\$" except
Change-Id: I6d1081fa30e88f555d0df2ebee9d7cbf264a33a2
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 917e7bf..9dee93e 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1040,18 +1040,24 @@
"stop/waiting",
"Could not resolve hostname",
"Unknown\sinstance",
+ "\$",
pexpect.TIMEOUT ], timeout=60 )
- self.handle.expect( "\$" )
if i == 0:
+ self.handle.expect( "\$" )
main.log.info( "ONOS service stopped" )
return main.TRUE
elif i == 1:
+ self.handle.expect( "\$" )
main.log.info( "onosStop() Unknown ONOS instance specified: " +
str( nodeIp ) )
return main.FALSE
elif i == 2:
+ self.handle.expect( "\$" )
main.log.warn( "ONOS wasn't running" )
return main.TRUE
+ elif i == 3:
+ main.log.info( "ONOS service stopped" )
+ return main.TRUE
else:
main.log.error( "ONOS service failed to stop" )
return main.FALSE
diff --git a/TestON/tests/SCPFscaleTopo/SCPFscaleTopo.py b/TestON/tests/SCPFscaleTopo/SCPFscaleTopo.py
index 68b040f..830fbf2 100644
--- a/TestON/tests/SCPFscaleTopo/SCPFscaleTopo.py
+++ b/TestON/tests/SCPFscaleTopo/SCPFscaleTopo.py
@@ -341,7 +341,7 @@
def CASE100( self, main ):
'''
- Balance masters, ping and bring third ONOS node down
+ Bring Down node 3
'''
main.case("Balancing Masters and bring ONOS node 3 down: TORUS %sx%s" % (main.currScale, main.currScale))
@@ -360,7 +360,10 @@
main.log.info( "Removing dead node from list of active nodes" )
main.activeNodes.pop( main.deadNode )
-
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully bring down node 3",
+ onfail="Failed to bring down node 3" )
def CASE200( self, main ):
'''