For consistency.
}
// Test there's validation of the data in the zone loader.
-TEST_F(ZoneLoaderTest, loadValidation) {
+TEST_F(ZoneLoaderTest, loadCheck) {
ZoneLoader loader(destination_client_, Name::ROOT_NAME(),
TEST_DATA_DIR "/novalidate.zone");
EXPECT_THROW(loader.loadIncremental(10), ZoneContentError);
}
// The same test, but for copying from other data source
-TEST_F(ZoneLoaderTest, copyValidation) {
+TEST_F(ZoneLoaderTest, copyCheck) {
prepareSource(Name::ROOT_NAME(), "novalidate.zone");
ZoneLoader loader(destination_client_, Name::ROOT_NAME(), source_client_);
callbacks(boost::bind(&logError, &zone_name, &zone_class, _1),
boost::bind(&logWarning, &zone_name, &zone_class, _1));
if (!dns::checkZone(zone_name, zone_class, collection, callbacks)) {
- // Validation failed.
+ // The post-load check failed.
loaded_ok_ = false;
isc_throw(ZoneContentError, "Errors found when validating zone " <<
zone_name << "/" << zone_class);
{}
};
-/// \brief Exception thrown when the zone doesn't validate.
+/// \brief Exception thrown when the zone doesn't pass post-load check.
///
/// This is thrown by the ZoneLoader when the zone is loaded, but it
/// doesn't pass basic sanity checks.
/// After the last RR is loaded, a sanity check of the zone is performed by
/// isc::dns::validateZone. It reports errors and warnings by logging them
/// directly. If there are any errors, a ZoneContentError exception is
- /// thrown.
+ /// thrown and the load is aborted (preserving the old version of zone, if
+ /// any).
///
/// \param limit The maximum allowed number of RRs to be loaded during this
/// call.