assert int(found) == 0, \
'Statistics item %s has unexpected value %s (expect %s)' % \
(name, found, 0)
+
+@step('check initial statistics for (Xfrin|Xfrout)')
+def check_init_statistics(step, module):
+ """
+ check the initial statistics for Xfrin or Xfrout.
+ Parameters:
+ module : Xfrin or Xfrout
+ """
+ query_str = 'When I query statistics %%s of bind10 module %s with cmdctl' % module
+ notcontain_str = 'last bindctl output should not contain "%s"'
+ check_str = 'The statistics counters are 0 in category .%s%%s' % module
+ if module == 'Xfrout':
+ query_str = query_str + ' port 47804'
+ step.given(query_str % 'zones')
+ step.given(notcontain_str % 'error')
+ step.given(notcontain_str % 'example.org.')
+ step.given(check_str % '.zones._SERVER_')
+ if module == 'Xfrout':
+ step.given(query_str % 'ixfr_running')
+ step.given(check_str)
+ step.given(query_str % 'axfr_running')
+ step.given(check_str)
#
# Test1 for Xfrout statistics
#
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- last bindctl output should not contain "error"
- last bindctl output should not contain "example.org."
- The statistics counters are 0 in category .Xfrout.zones._SERVER_
-
- When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
- The statistics counters are 0 in category .Xfrout
-
- When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
- The statistics counters are 0 in category .Xfrout
-
+ 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 |
#
# Test2 for Xfrin statistics
#
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrin with cmdctl
- last bindctl output should not contain "error"
- The statistics counters are 0 in category .Xfrin.zones._SERVER_
-
+ 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
#
# Test5 for Xfrout statistics
#
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- last bindctl output should not contain "error"
- last bindctl output should not contain "example.org."
- The statistics counters are 0 in category .Xfrout.zones._SERVER_
-
- When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
- The statistics counters are 0 in category .Xfrout
-
- When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
- The statistics counters are 0 in category .Xfrout
-
+ 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 |
#
# Test6 for Xfrin statistics
#
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrin with cmdctl
- last bindctl output should not contain "error"
- The statistics counters are 0 in category .Xfrin.zones._SERVER_
-
+ check initial statistics for Xfrin
#
# set transfer_acl rejection
# Local xfr requests from Xfrin module would be rejected here.