|
@@ -1142,21 +1142,42 @@ InMemoryZoneFinderTest::wildcardCheck(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// We have combinations of these cases (6 in total)
|
|
|
+// expected_flags: NSEC, NSEC3, RESULT_DEFAULT
|
|
|
+// options: NO_WILDCARD, FIND_DEFAULT
|
|
|
+
|
|
|
+// 1. Normal case: expected = DEFAULT, options = DEFAULT
|
|
|
TEST_F(InMemoryZoneFinderTest, wildcard) {
|
|
|
- // Normal case
|
|
|
wildcardCheck();
|
|
|
}
|
|
|
|
|
|
+// 2. options: expected = DEFAULT, options = NO_WILDCARD
|
|
|
+TEST_F(InMemoryZoneFinderTest, wildcardDisabled) {
|
|
|
+ // Similar to the previous once, but check the behavior for a non signed
|
|
|
+ // zone just in case.
|
|
|
+ wildcardCheck(ZoneFinder::RESULT_DEFAULT, ZoneFinder::NO_WILDCARD);
|
|
|
+}
|
|
|
+
|
|
|
+// 3. options: expected = NSEC_SIGNED, options = DEFAULT
|
|
|
+TEST_F(InMemoryZoneFinderTest, wildcardWithNSEC) {
|
|
|
+ wildcardCheck(ZoneFinder::RESULT_NSEC_SIGNED, ZoneFinder::FIND_DEFAULT);
|
|
|
+}
|
|
|
+
|
|
|
+// 4. options: expected = NSEC_SIGNED, options = NO_WILDCARD
|
|
|
TEST_F(InMemoryZoneFinderTest, wildcardDisabledWithNSEC) {
|
|
|
// Wildcard is disabled. In practice, this is used as part of query
|
|
|
// processing for an NSEC-signed zone, so we test that case specifically.
|
|
|
wildcardCheck(ZoneFinder::RESULT_NSEC_SIGNED, ZoneFinder::NO_WILDCARD);
|
|
|
}
|
|
|
|
|
|
-TEST_F(InMemoryZoneFinderTest, wildcardDisabledWithoutNSEC) {
|
|
|
- // Similar to the previous once, but check the behavior for a non signed
|
|
|
- // zone just in case.
|
|
|
- wildcardCheck(ZoneFinder::RESULT_DEFAULT, ZoneFinder::NO_WILDCARD);
|
|
|
+// 5. options: expected = NSEC3_SIGNED, options = DEFAULT
|
|
|
+TEST_F(InMemoryZoneFinderTest, wildcardWithNSEC3) {
|
|
|
+ wildcardCheck(ZoneFinder::RESULT_NSEC3_SIGNED, ZoneFinder::FIND_DEFAULT);
|
|
|
+}
|
|
|
+
|
|
|
+// 6. options: expected = NSEC3_SIGNED, options = DEFAULT
|
|
|
+TEST_F(InMemoryZoneFinderTest, wildcardDisabledWithNSEC3) {
|
|
|
+ wildcardCheck(ZoneFinder::RESULT_NSEC3_SIGNED, ZoneFinder::NO_WILDCARD);
|
|
|
}
|
|
|
|
|
|
/*
|