raise an AssertionError if do_barrier fails
This removes a lot of boilerplate code.
diff --git a/tests/actions.py b/tests/actions.py
index 7a3df4e..8be69dc 100644
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -57,7 +57,7 @@
msg.buffer_id = 0xffffffff
msg.match = match
self.controller.message_send(msg)
- self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
+ do_barrier(self.controller)
#Sending N packets matching the flow inserted
for pkt_cnt in range(5):
@@ -160,7 +160,7 @@
logging.info("Inserting flow")
self.controller.message_send(request)
- self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
+ do_barrier(self.controller)
#Send Packet matching the flow
logging.info("Sending packet to dp port " + str(ingress_port))
@@ -211,7 +211,7 @@
logging.info("Inserting flow")
self.controller.message_send(request)
- self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
+ do_barrier(self.controller)
#Send packet matching the flow
logging.info("Sending packet to dp port " + str(ingress_port))
@@ -262,7 +262,7 @@
logging.info("Inserting flow")
self.controller.message_send(request)
- self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
+ do_barrier(self.controller)
#Send packet matching the flow
logging.info("Sending packet to dp port " + str(ingress_port))
@@ -311,7 +311,7 @@
logging.info("Inserting flow")
self.controller.message_send(request)
- self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
+ do_barrier(self.controller)
#Send Packet matching the flow
logging.info("Sending packet to dp port " + str(ingress_port))
@@ -360,7 +360,7 @@
request.actions.add(act)
logging.info("Inserting flow")
self.controller.message_send(request)
- self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
+ do_barrier(self.controller)
#Send packet matching the flow
logging.info("Sending packet to dp port " + str(ingress_port))