--- /dev/null
+. 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2010030802 1800 900 604800 86400
+. 86400 IN NS ns.
+; Missing the address for the nameserver. This should generate a warning, but not error.
+www. 3600 IN A 192.0.2.1
EXPECT_FALSE(destination_client_.commit_called_);
}
+// Check a warning doesn't disrupt the loading of the zone
+TEST_F(ZoneLoaderTest, loadCheckWarn) {
+ ZoneLoader loader(destination_client_, Name::ROOT_NAME(),
+ TEST_DATA_DIR "/checkwarn.zone");
+ EXPECT_TRUE(loader.loadIncremental(10));
+ // The messages go to the log. We don't have an easy way to examine them.
+ // But the zone was committed and contains all 3 RRs
+ EXPECT_TRUE(destination_client_.commit_called_);
+ EXPECT_EQ(3, destination_client_.rrsets_.size());
+}
+
+TEST_F(ZoneLoaderTest, copyCheckWarn) {
+ prepareSource(Name::ROOT_NAME(), "checkwarn.zone");
+ ZoneLoader loader(destination_client_, Name::ROOT_NAME(), source_client_);
+ EXPECT_TRUE(loader.loadIncremental(10));
+ // The messages go to the log. We don't have an easy way to examine them.
+ // But the zone was committed and contains all 3 RRs
+ EXPECT_TRUE(destination_client_.commit_called_);
+ EXPECT_EQ(3, destination_client_.rrsets_.size());
+
+}
+
}