|
@@ -14,6 +14,8 @@
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
+#include <exceptions/exceptions.h>
|
|
|
+
|
|
|
#include <dns/name.h>
|
|
|
|
|
|
#include <cc/data.h>
|
|
@@ -151,6 +153,14 @@ TEST_F(ResolverTest, notifyFail) {
|
|
|
Opcode::NOTIFY().getCode(), QR_FLAG, 0, 0, 0, 0);
|
|
|
}
|
|
|
|
|
|
+TEST_F(ResolverTest, setQueryACL) {
|
|
|
+ // valid cases are tested through other tests. We only explicitly check
|
|
|
+ // an invalid case: passing a NULL shared pointer.
|
|
|
+ EXPECT_THROW(server.setQueryACL(
|
|
|
+ boost::shared_ptr<const Resolver::ClientACL>()),
|
|
|
+ isc::InvalidParameter);
|
|
|
+}
|
|
|
+
|
|
|
TEST_F(ResolverTest, queryACL) {
|
|
|
// The "ACCEPT" cases are covered in other tests. Here we explicitly
|
|
|
// test "REJECT" and "DROP" cases.
|