mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-10-09 13:46:20 +00:00
[1177] Don't propagate name exceptions from findPreviousName
They should be turned into DataSourceError instead, as they mean bad data in the DB.
This commit is contained in:
@@ -566,6 +566,8 @@ public:
|
||||
return ("www.example.org.");
|
||||
} else if (rname == "org.example.badnsec2.") {
|
||||
return ("badnsec1.example.org.");
|
||||
} else if (rname == "org.example.brokenname.") {
|
||||
return ("brokenname...example.org.");
|
||||
} else if (rname == "org.example.notimplnsec." ||
|
||||
rname == "org.example.wild.here.") {
|
||||
isc_throw(isc::NotImplemented, "Not implemented in this test");
|
||||
@@ -2347,4 +2349,11 @@ TEST_F(MockDatabaseClientTest, missingNSEC) {
|
||||
DataSourceError);
|
||||
}
|
||||
|
||||
TEST_F(MockDatabaseClientTest, badName) {
|
||||
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
|
||||
|
||||
EXPECT_THROW(finder->findPreviousName(Name("brokenname.example.org.")),
|
||||
DataSourceError);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user