mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 13:37:55 +00:00
[2281] Enable factory test for static DS with bad zone file
This commit is contained in:
@@ -114,5 +114,6 @@ EXTRA_DIST += testdata/new_minor_schema.sqlite3
|
||||
EXTRA_DIST += testdata/newschema.sqlite3
|
||||
EXTRA_DIST += testdata/oldschema.sqlite3
|
||||
EXTRA_DIST += testdata/static.zone
|
||||
EXTRA_DIST += testdata/static-bad.zone
|
||||
EXTRA_DIST += testdata/novalidate.zone
|
||||
EXTRA_DIST += testdata/checkwarn.zone
|
||||
|
@@ -29,6 +29,7 @@ using namespace isc::data;
|
||||
|
||||
std::string SQLITE_DBFILE_EXAMPLE_ORG = TEST_DATA_DIR "/example.org.sqlite3";
|
||||
const std::string STATIC_DS_FILE = TEST_DATA_DIR "/static.zone";
|
||||
const std::string STATIC_BAD_DS_FILE = TEST_DATA_DIR "/static-bad.zone";
|
||||
const std::string ROOT_ZONE_FILE = TEST_DATA_DIR "/root.zone";
|
||||
|
||||
namespace {
|
||||
@@ -187,13 +188,9 @@ TEST(FactoryTest, staticDS) {
|
||||
}
|
||||
|
||||
// Check that file not containing BIND./CH is rejected
|
||||
//
|
||||
// FIXME: This test is disabled because the InMemoryZoneFinder::load does
|
||||
// not check if the data loaded correspond with the origin. The static
|
||||
// factory is not the place to fix that.
|
||||
TEST(FactoryTest, DISABLED_staticDSBadFile) {
|
||||
TEST(FactoryTest, staticDSBadFile) {
|
||||
// The only configuration is the file to load.
|
||||
const ConstElementPtr config(new StringElement(STATIC_DS_FILE));
|
||||
const ConstElementPtr config(new StringElement(STATIC_BAD_DS_FILE));
|
||||
// See it does not want the file
|
||||
EXPECT_THROW(DataSourceClientContainer("static", config), DataSourceError);
|
||||
}
|
||||
|
3
src/lib/datasrc/tests/testdata/static-bad.zone
vendored
Normal file
3
src/lib/datasrc/tests/testdata/static-bad.zone
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
NOTBIND. 3600 CH SOA NOTBIND. NOTBIND. 4 3600 300 36000 3600
|
||||
NOTBIND. 3600 CH NS NOTBIND.
|
||||
VERSION.NOTBIND. 3600 CH TXT "10"
|
Reference in New Issue
Block a user