Commit 516e15b8 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[1607] added a test to confirm that getAdditional keeps existing RRs intact.

parent 510292e6
......@@ -164,6 +164,16 @@ TEST_P(ZoneFinderContextTest, getAdditionalAuthNS) {
rrsetsCheck(" 3600 IN AAAA 2001:db8::1\n",
result_sets_.begin(), result_sets_.end());
// Getting A again, without clearing the result sets. This confirms
// getAdditional() doesn't change the existing vector content.
ctx->getAdditional(REQUESTED_A, result_sets_);
// The first element should be the existing AAAA RR, followed by the A's.
EXPECT_EQ(RRType::AAAA(), result_sets_[0]->getType());
rrsetsCheck(" 3600 IN AAAA 2001:db8::1\n"
" 3600 IN A\n"
" 3600 IN A\n",
result_sets_.begin(), result_sets_.end());
// Normally expected type set contain only A and/or AAAA, but others aren't
// excluded.
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