summaryrefslogtreecommitdiffstats
path: root/test/test_acl_plugin.py
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2017-11-10 13:15:12 -0600
committerFlorin Coras <florin.coras@gmail.com>2017-11-11 19:06:46 +0000
commit27cadd23b6c220e73552fa7b3fe61e5874d07cec (patch)
treeeddf4bce55a3dcce933dcfd2984abac57a739a90 /test/test_acl_plugin.py
parent62fe07c8e30a6ac718fe65528592fe6964d753fa (diff)
ACLs: Use better error return codes than "-1" everywhere.
Added two new errors: ACL_IN_USE_INBOUND ACL_IN_USE_OUTBOUND Update ACL tests to expect new, precise return values. Change-Id: I644861a18aa5b70cce5f451dd6655641160c7697 Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'test/test_acl_plugin.py')
-rw-r--r--test/test_acl_plugin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_acl_plugin.py b/test/test_acl_plugin.py
index 4d748921aaf..361ced14c21 100644
--- a/test/test_acl_plugin.py
+++ b/test/test_acl_plugin.py
@@ -558,15 +558,15 @@ class TestACLplugin(VppTestCase):
# Test 2: try to modify a nonexistent ACL
reply = self.vapi.acl_add_replace(acl_index=432, r=r,
- tag="FFFF:FFFF", expected_retval=-1)
- self.assertEqual(reply.retval, -1)
+ tag="FFFF:FFFF", expected_retval=-6)
+ self.assertEqual(reply.retval, -6)
# The ACL number should pass through
self.assertEqual(reply.acl_index, 432)
# apply an ACL on an interface inbound, try to delete ACL, must fail
self.vapi.acl_interface_set_acl_list(sw_if_index=self.pg0.sw_if_index,
n_input=1,
acls=[first_acl])
- reply = self.vapi.acl_del(acl_index=first_acl, expected_retval=-1)
+ reply = self.vapi.acl_del(acl_index=first_acl, expected_retval=-142)
# Unapply an ACL and then try to delete it - must be ok
self.vapi.acl_interface_set_acl_list(sw_if_index=self.pg0.sw_if_index,
n_input=0,
@@ -577,7 +577,7 @@ class TestACLplugin(VppTestCase):
self.vapi.acl_interface_set_acl_list(sw_if_index=self.pg0.sw_if_index,
n_input=0,
acls=[second_acl])
- reply = self.vapi.acl_del(acl_index=second_acl, expected_retval=-1)
+ reply = self.vapi.acl_del(acl_index=second_acl, expected_retval=-143)
# Unapply the ACL and then try to delete it - must be ok
self.vapi.acl_interface_set_acl_list(sw_if_index=self.pg0.sw_if_index,
n_input=0,
@@ -588,7 +588,7 @@ class TestACLplugin(VppTestCase):
self.vapi.acl_interface_set_acl_list(sw_if_index=self.pg0.sw_if_index,
n_input=1,
acls=[first_acl],
- expected_retval=-1)
+ expected_retval=-6)
self.logger.info("ACLP_TEST_FINISH_0001")