Commit cf297878 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[1390] fix tests

parent 52f4e6fa
...@@ -814,8 +814,9 @@ TEST_F(AuthSrvTest, queryCounterTCPAXFR) { ...@@ -814,8 +814,9 @@ TEST_F(AuthSrvTest, queryCounterTCPAXFR) {
Name("example.com"), RRClass::IN(), RRType::AXFR()); Name("example.com"), RRClass::IN(), RRType::AXFR());
createRequestPacket(request_message, IPPROTO_TCP); createRequestPacket(request_message, IPPROTO_TCP);
// On success, the AXFR query has been passed to a separate process, // On success, the AXFR query has been passed to a separate process,
// so we shouldn't have to respond. // so auth itself shouldn't respond.
server.processMessage(*io_message, parse_message, response_obuffer, &dnsserv); server.processMessage(*io_message, parse_message, response_obuffer, &dnsserv);
EXPECT_FALSE(dnsserv.hasAnswer());
// After processing TCP AXFR query, the counter should be 1. // After processing TCP AXFR query, the counter should be 1.
EXPECT_EQ(1, server.getCounter(AuthCounters::COUNTER_TCP_QUERY)); EXPECT_EQ(1, server.getCounter(AuthCounters::COUNTER_TCP_QUERY));
} }
...@@ -827,10 +828,11 @@ TEST_F(AuthSrvTest, queryCounterTCPIXFR) { ...@@ -827,10 +828,11 @@ TEST_F(AuthSrvTest, queryCounterTCPIXFR) {
UnitTestUtil::createRequestMessage(request_message, opcode, default_qid, UnitTestUtil::createRequestMessage(request_message, opcode, default_qid,
Name("example.com"), RRClass::IN(), RRType::IXFR()); Name("example.com"), RRClass::IN(), RRType::IXFR());
createRequestPacket(request_message, IPPROTO_TCP); createRequestPacket(request_message, IPPROTO_TCP);
// On success, the AXFR query has been passed to a separate process, // On success, the IXFR query has been passed to a separate process,
// so we shouldn't have to respond. // so auth itself shouldn't respond.
server.processMessage(*io_message, parse_message, response_obuffer, &dnsserv); server.processMessage(*io_message, parse_message, response_obuffer, &dnsserv);
// After processing TCP AXFR query, the counter should be 1. EXPECT_FALSE(dnsserv.hasAnswer());
// After processing TCP IXFR query, the counter should be 1.
EXPECT_EQ(1, server.getCounter(AuthCounters::COUNTER_TCP_QUERY)); EXPECT_EQ(1, server.getCounter(AuthCounters::COUNTER_TCP_QUERY));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment