});
/* we populate the cache with a flawed NSset, i.e. there is a NS entry but no corresponding glue */
- time_t now = time(nullptr);
+ time_t now = sr->getNow().tv_sec;
std::vector<DNSRecord> records;
std::vector<shared_ptr<RRSIGRecordContent> > sigs;
addRecordToList(records, target, QType::NS, "pdns-public-ns1.powerdns.com.", DNSResourceRecord::AUTHORITY, now + 3600);
});
/* we populate the cache with eveything we need */
- time_t now = time(nullptr);
+ time_t now = sr->getNow().tv_sec;
std::vector<DNSRecord> records;
std::vector<shared_ptr<RRSIGRecordContent> > sigs;
return 0;
});
- const time_t now = time(nullptr);
+ const time_t now = sr->getNow().tv_sec;
SyncRes::s_minimumTTL = 60;
SyncRes::s_maxcachettl = 3600;
});
/* we populate the cache with entries that expired 60s ago*/
- time_t now = time(nullptr);
+ time_t now = sr->getNow().tv_sec;
std::vector<DNSRecord> records;
std::vector<shared_ptr<RRSIGRecordContent> > sigs;
addRecordToList(records, target, QType::A, "192.0.2.42", DNSResourceRecord::ANSWER, now - 60);
return 0;
});
- const time_t now = time(nullptr);
+ const time_t now = sr->getNow().tv_sec;
vector<DNSRecord> ret;
int res = sr->beginResolve(target, QType(QType::A), QClass::IN, ret);
BOOST_CHECK_EQUAL(res, RCode::NoError);
return 0;
});
- const time_t now = time(nullptr);
+ const time_t now = sr->getNow().tv_sec;
vector<DNSRecord> ret;
int res = sr->beginResolve(target, QType(QType::A), QClass::IN, ret);
BOOST_CHECK_EQUAL(res, RCode::NoError);