Review Board 1.7.16

ACL unit tests

Review Request #532 - Created Feb. 25, 2010 and submitted

Mark Michelson
There are two unit tests contained here.

1. "Invalid ACL" This attempts to read a bunch of badly formatted ACL entries and add them to a host access rule. The goal of this test is to be sure that all invalid entries are rejected as they should be.

2. "ACL" This sets up four ACLs. One is a permit all, one is a deny all, and the other two have specific rules about which subnets are allowed and which are not. Then a set of test addresses is used to determine whether we would allow those addresses to access us when each ACL is applied. This test, by the way, was what resulted in AST-2010-003's creation.
Both tests run and pass.
Ship it!
Posted (March 25, 2010, 7:14 a.m.)


/trunk/tests/test_acl.c (Diff revision 1)
Add the ASTERISK_FILE_VERSION macro after this line
/trunk/tests/test_acl.c (Diff revision 1)
You could just remember that a case failed and continue trying the rest of your test cases before returning failure.
/trunk/tests/test_acl.c (Diff revision 1)
Move the { to the next line
/trunk/tests/test_acl.c (Diff revision 1)
red block of death runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to