Commit d12b460f authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2212] also ported loadZoneWithoutDataSrc test.

parent 3b3b4229
......@@ -442,6 +442,17 @@ TEST_F(DataSrcClientsBuilderTest, loadUnreadableZone) {
zoneChecks(clients_map, rrclass); // zone shouldn't be replaced
}
TEST_F(DataSrcClientsBuilderTest, loadZoneWithoutDataSrc) {
// try to execute load command without configuring the zone beforehand.
// it should fail.
EXPECT_THROW(builder.handleCommand(
Command(LOADZONE,
Element::fromJSON(
"{\"class\": \"IN\", "
" \"origin\": \"test1.example\"}"))),
TestDataSrcClientsBuilder::InternalCommandError);
}
TEST_F(DataSrcClientsBuilderTest, loadZoneInvalidParams) {
configureZones();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment