Fix SRRouting test steps and result assertions
Change-Id: Iee775ec21ec40a7fce01528cc23dcb7aa1ad468d
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index 45e8c1b..df7c87d 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -103,11 +103,9 @@
# Test switch failures
if switchFailure:
for switch, expected in main.switchFailureChart.items():
- main.step( "Killing switch {}" % switch )
run.killSwitch( main, switch, expected['switches_after_failure'], expected['links_after_failure'] )
SRRoutingTest.runChecks( main, test_idx, countFlowsGroups )
- main.step( "Restoring switch {}" % switch )
run.recoverSwitch( main, switch, expected['switches_before_failure'], expected['links_before_failure'] )
SRRoutingTest.runChecks( main, test_idx, countFlowsGroups )
@@ -119,11 +117,9 @@
linksBefore = info['links_before']
linksAfter = info['links_after']
- main.step( "Killing links {}" % linksToRemove )
run.killLinkBatch( main, linksToRemove, linksAfter )
SRRoutingTest.runChecks( main, test_idx, countFlowsGroups )
- main.step( "Restoring links {}" % linksToRemove )
run.restoreLinkBatch( main, linksToRemove, linksBefore )
SRRoutingTest.runChecks( main, test_idx, countFlowsGroups )
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 45d166e..bc31374 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -518,6 +518,10 @@
attempts=10,
sleep=main.linkSleep )
+ utilities.assert_equals( expect=main.TRUE, actual=topology,
+ onpass="Link batch down successful",
+ onfail="Link batch down failed" )
+
@staticmethod
def restoreLinkBatch( main, links, linksAfter, switches=7):
"""
@@ -542,6 +546,10 @@
attempts=10,
sleep=main.linkSleep )
+ utilities.assert_equals( expect=main.TRUE, actual=topology,
+ onpass="Link batch up successful",
+ onfail="Link batch up failed" )
+
@staticmethod
def restoreLink( main, end1, end2, dpid1, dpid2, port1, port2, switches,
links ):