Handle no drop reports in INT test
Change-Id: Ibd6e92945fadfdc87d67cee9a1cb75107ef17e31
diff --git a/TestON/tests/USECASE/SegmentRouting/INT/INT.py b/TestON/tests/USECASE/SegmentRouting/INT/INT.py
index 4942d44..3da88d4 100644
--- a/TestON/tests/USECASE/SegmentRouting/INT/INT.py
+++ b/TestON/tests/USECASE/SegmentRouting/INT/INT.py
@@ -135,8 +135,13 @@
)
main.step("Checking drop reason from the report")
- dropAnomaly = dropAnomalies[0]
- dropReason = dropAnomaly["DropReason"]
+ try:
+ dropAnomaly = dropAnomalies[0]
+ dropReason = dropAnomaly["DropReason"]
+ except IndexError:
+ main.log.warn( "No drop report was found" )
+ dropAnomaly = None
+ dropReason = None
# DROP_REASON_PORT_VLAN_MAPPING_MISS = 55
utilities.assert_equals(
@@ -211,8 +216,13 @@
)
main.step("Checking drop reason from report")
- dropAnomaly = dropAnomalies[0]
- dropReason = dropAnomaly["DropReason"]
+ try:
+ dropAnomaly = dropAnomalies[0]
+ dropReason = dropAnomaly["DropReason"]
+ except IndexError:
+ main.log.warn( "No drop report was found" )
+ dropAnomaly = None
+ dropReason = None
# DROP_REASON_IP_TTL_ZERO = 26
utilities.assert_equals(
expect=26, actual=dropReason,