From: Naoki Kambe Date: Wed, 13 Mar 2013 01:38:30 +0000 (+0900) Subject: [2252] add a test scenario for handling incoming notify only in IPv4 X-Git-Tag: bind10-1.2.0beta1-release~474^2~4^2~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be67ff2306c8aa98efd9ae3b017a2926dd3fd46e;p=thirdparty%2Fkea.git [2252] add a test scenario for handling incoming notify only in IPv4 --- diff --git a/tests/lettuce/configurations/xfrin/retransfer_master_v4.conf.orig b/tests/lettuce/configurations/xfrin/retransfer_master_v4.conf.orig new file mode 100644 index 0000000000..2a1a8b0cab --- /dev/null +++ b/tests/lettuce/configurations/xfrin/retransfer_master_v4.conf.orig @@ -0,0 +1,45 @@ +{ + "version": 3, + "Logging": { + "loggers": [ { + "debuglevel": 99, + "severity": "DEBUG", + "name": "*" + } ] + }, + "Auth": { + "database_file": "data/example.org.sqlite3", + "listen_on": [ { + "address": "127.0.0.1", + "port": 47807 + } ] + }, + "data_sources": { + "classes": { + "IN": [{ + "type": "sqlite3", + "params": { + "database_file": "data/example.org.sqlite3" + } + }] + } + }, + "Xfrout": { + "zone_config": [ { + "origin": "example.org" + } ], + "also_notify": [ { + "address": "127.0.0.1", + "port": 47806 + } ] + }, + "Init": { + "components": { + "b10-auth": { "kind": "needed", "special": "auth" }, + "b10-xfrout": { "address": "Xfrout", "kind": "dispensable" }, + "b10-zonemgr": { "address": "Zonemgr", "kind": "dispensable" }, + "b10-stats": { "address": "Stats", "kind": "dispensable" }, + "b10-cmdctl": { "special": "cmdctl", "kind": "needed" } + } + } +} diff --git a/tests/lettuce/configurations/xfrin/retransfer_slave_notify_v4.conf b/tests/lettuce/configurations/xfrin/retransfer_slave_notify_v4.conf new file mode 100644 index 0000000000..6270bfdc9c --- /dev/null +++ b/tests/lettuce/configurations/xfrin/retransfer_slave_notify_v4.conf @@ -0,0 +1,49 @@ +{ + "version": 3, + "Logging": { + "loggers": [ { + "debuglevel": 99, + "severity": "DEBUG", + "name": "*" + } ] + }, + "Auth": { + "database_file": "data/xfrin-notify.sqlite3", + "listen_on": [ { + "address": "127.0.0.1", + "port": 47806 + } ] + }, + "data_sources": { + "classes": { + "IN": [{ + "type": "sqlite3", + "params": { + "database_file": "data/xfrin-notify.sqlite3" + } + }] + } + }, + "Xfrin": { + "zones": [ { + "name": "example.org", + "master_addr": "127.0.0.1", + "master_port": 47807 + } ] + }, + "Zonemgr": { + "secondary_zones": [ { + "name": "example.org", + "class": "IN" + } ] + }, + "Init": { + "components": { + "b10-auth": { "kind": "needed", "special": "auth" }, + "b10-xfrin": { "address": "Xfrin", "kind": "dispensable" }, + "b10-zonemgr": { "address": "Zonemgr", "kind": "dispensable" }, + "b10-stats": { "address": "Stats", "kind": "dispensable" }, + "b10-cmdctl": { "special": "cmdctl", "kind": "needed" } + } + } +} diff --git a/tests/lettuce/features/terrain/terrain.py b/tests/lettuce/features/terrain/terrain.py index ce7426b4db..22b1ec81ce 100644 --- a/tests/lettuce/features/terrain/terrain.py +++ b/tests/lettuce/features/terrain/terrain.py @@ -64,6 +64,8 @@ copylist = [ "configurations/ddns/noddns.config"], ["configurations/xfrin/retransfer_master.conf.orig", "configurations/xfrin/retransfer_master.conf"], + ["configurations/xfrin/retransfer_master_v4.conf.orig", + "configurations/xfrin/retransfer_master_v4.conf"], ["configurations/xfrin/retransfer_master_nons.conf.orig", "configurations/xfrin/retransfer_master_nons.conf"], ["configurations/xfrin/retransfer_slave.conf.orig", diff --git a/tests/lettuce/features/xfrin_notify_handling.feature b/tests/lettuce/features/xfrin_notify_handling.feature index 47e0ecbbd4..2f7f22d2a9 100644 --- a/tests/lettuce/features/xfrin_notify_handling.feature +++ b/tests/lettuce/features/xfrin_notify_handling.feature @@ -94,6 +94,102 @@ Feature: Xfrin incoming notify handling | example.org..xfrsuccess | 1 | | | example.org..latest_axfr_duration | | 0.0 | + # + # Test for handling incoming notify only in IPv4 + # + Scenario: Handle incoming notify (IPv4) + Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master + And wait for master stderr message BIND10_STARTED_CC + And wait for master stderr message CMDCTL_STARTED + And wait for master stderr message AUTH_SERVER_STARTED + And wait for master stderr message XFROUT_STARTED + And wait for master stderr message ZONEMGR_STARTED + And wait for master stderr message STATS_STARTING + + And I have bind10 running with configuration xfrin/retransfer_slave_notify_v4.conf + And wait for bind10 stderr message BIND10_STARTED_CC + And wait for bind10 stderr message CMDCTL_STARTED + And wait for bind10 stderr message AUTH_SERVER_STARTED + And wait for bind10 stderr message XFRIN_STARTED + And wait for bind10 stderr message ZONEMGR_STARTED + + A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN + + # + # Test1 for Xfrout statistics + # + check initial statistics for Xfrout + When I query statistics socket of bind10 module Xfrout with cmdctl port 47804 + The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items + | item_name | min_value | max_value | + | open | 0 | 1 | + + # + # Test2 for Xfrin statistics + # + check initial statistics for Xfrin + When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN + Then wait for new master stderr message XFROUT_NOTIFY_COMMAND + Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY + Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY + Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED + Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE + Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS + Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY + Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED + + A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR + + # + # Test3 for Xfrout statistics + # + # check statistics change + # + + # wait until the last stats requesting is finished + When I query statistics zones of bind10 module Xfrout with cmdctl port 47804 + wait for new master stderr message STATS_SEND_STATISTICS_REQUEST + wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND + last bindctl output should not contain "error" + + When I query statistics zones of bind10 module Xfrout with cmdctl port 47804 + The statistics counters are 0 in category .Xfrout.zones except for the following items + | item_name | item_value | + | _SERVER_.notifyoutv4 | 5 | + | _SERVER_.xfrreqdone | 1 | + | example.org..notifyoutv4 | 5 | + | example.org..xfrreqdone | 1 | + + When I query statistics socket of bind10 module Xfrout with cmdctl port 47804 + The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items + | item_name | item_value | + | open | 1 | + | accept | 1 | + + # + # Test4 for Xfrin statistics + # + # check statistics change + # + + # wait until the last stats requesting is finished + When I query statistics zones of bind10 module Xfrin with cmdctl + wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST + wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND + last bindctl output should not contain "error" + + When I query statistics zones of bind10 module Xfrin with cmdctl + The statistics counters are 0 in category .Xfrin.zones except for the following items + | item_name | item_value | min_value | + | _SERVER_.soaoutv4 | 1 | | + | _SERVER_.axfrreqv4 | 1 | | + | _SERVER_.xfrsuccess | 1 | | + | _SERVER_.latest_axfr_duration | | 0.0 | + | example.org..soaoutv4 | 1 | | + | example.org..axfrreqv4 | 1 | | + | example.org..xfrsuccess | 1 | | + | example.org..latest_axfr_duration | | 0.0 | + # # Test for Xfr request rejected #