2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-04 07:55:18 +00:00

[2310] added a test case where the original TTL is smaller than SOA minttl.

This commit is contained in:
JINMEI Tatuya
2013-01-28 10:46:27 -08:00
parent b122fa56ec
commit 2ca96761f1

View File

@@ -739,6 +739,14 @@ TEST_F(InMemoryZoneFinderTest, findAtOriginWithMinTTL) {
ZoneFinder::RESULT_DEFAULT, NULL,
ZoneFinder::FIND_DEFAULT, false);
// If the found RRset has a smaller TTL than SOA, the original TTL should
// win.
rr_a_->setTTL(RRTTL(10));
addToZoneData(rr_a_);
findAtOriginTest(RRType::A(), ZoneFinder::SUCCESS, true, rr_a_,
ZoneFinder::RESULT_DEFAULT, NULL,
ZoneFinder::FIND_DEFAULT, true);
// If no RRset is returned, use_minttl doesn't matter (it shouldn't cause
// disruption)
findAtOriginTest(RRType::TXT(), ZoneFinder::NXRRSET, true, ConstRRsetPtr(),