From: Michal 'vorner' Vaner Date: Wed, 9 Jan 2013 10:06:13 +0000 (+0100) Subject: [2436] More renaming from validation to check X-Git-Tag: bind10-1.0.0-rc-release~99^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30bb4f426cc06433dbfdbad4d6080ff9ab80ca10;p=thirdparty%2Fkea.git [2436] More renaming from validation to check For consistency. --- diff --git a/src/lib/datasrc/tests/zone_loader_unittest.cc b/src/lib/datasrc/tests/zone_loader_unittest.cc index 3ff80b04bf..5c389bd818 100644 --- a/src/lib/datasrc/tests/zone_loader_unittest.cc +++ b/src/lib/datasrc/tests/zone_loader_unittest.cc @@ -422,7 +422,7 @@ TEST_F(ZoneLoaderTest, loadSyntaxError) { } // 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); @@ -431,7 +431,7 @@ TEST_F(ZoneLoaderTest, loadValidation) { } // 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_); diff --git a/src/lib/datasrc/zone_loader.cc b/src/lib/datasrc/zone_loader.cc index 628f7efeef..41a13ab590 100644 --- a/src/lib/datasrc/zone_loader.cc +++ b/src/lib/datasrc/zone_loader.cc @@ -154,7 +154,7 @@ ZoneLoader::loadIncremental(size_t limit) { 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); diff --git a/src/lib/datasrc/zone_loader.h b/src/lib/datasrc/zone_loader.h index 292360fda0..c7e5ccdc3d 100644 --- a/src/lib/datasrc/zone_loader.h +++ b/src/lib/datasrc/zone_loader.h @@ -48,7 +48,7 @@ public: {} }; -/// \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. @@ -138,7 +138,8 @@ public: /// 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.