52 CPPUNIT_ASSERT_EQUAL(
false,
static_cast<bool>(anACL.
beStrict));
54 CPPUNIT_ASSERT_EQUAL(
false,anACL.
valid());
75 char * line =
xstrdup(
"test max_user_ip -s 1");
82 CPPUNIT_ASSERT(anACL);
84 CPPUNIT_ASSERT(maxUserIpACL);
87 CPPUNIT_ASSERT_EQUAL(1, maxUserIpACL->
getMaximum());
88 CPPUNIT_ASSERT_EQUAL(
true,
static_cast<bool>(maxUserIpACL->
beStrict));
90 CPPUNIT_ASSERT_EQUAL(
true, maxUserIpACL->
valid());
97main(
int argc,
char *argv[])
static ConfigParser LegacyParser
bool valid() const override
Acl::BooleanOptionValue beStrict
Enforce "one user, one device" policy?
static void ParseNamedAcl(ConfigParser &, NamedAcls *&)
parses acl directive parts that follow directive name (i.e. "acl")
static Acl::Node * FindByName(const SBuf &)
A configured ACL with a given name or nil.
static void SetCfgLine(char *line)
Set the configuration file line to parse.
customizes our test setup
Acl::NamedAcls * namedAcls
acl aclname acltype ...
CPPUNIT_TEST(testDefaults)
CPPUNIT_TEST_SUITE(TestACLMaxUserIP)
CPPUNIT_TEST(testParseLine)
implements test program's main() function while enabling customization
int run(int argc, char *argv[])
void RegisterMaker(TypeName typeName, Maker maker)
use the given Acl::Node Maker for all ACLs of the named type
const char * TypeName
the ACL type name known to admins
void FreeNamedAcls(NamedAcls **)
delete the given list of "acl" directives
CPPUNIT_TEST_SUITE_REGISTRATION(TestACLMaxUserIP)
AnyP::PortCfgPointer HttpPortList
list of Squid http(s)_port configured