From: Naoki Kambe Date: Thu, 21 Mar 2013 06:35:19 +0000 (+0900) Subject: [2252] add a port number of cmdctl as an option of check_init_statistics() X-Git-Tag: bind10-1.2.0beta1-release~474^2~4^2~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0eec3b5ce47348b8fdf8eae9ffc61dcb4db0ccb0;p=thirdparty%2Fkea.git [2252] add a port number of cmdctl as an option of check_init_statistics() --- diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py index c43af98d94..5c22384f1d 100644 --- a/tests/lettuce/features/terrain/bind10_control.py +++ b/tests/lettuce/features/terrain/bind10_control.py @@ -438,16 +438,20 @@ def check_statistics_items(step, category, has_except_for): 'Statistics item %s has unexpected value %s (expect %s)' % \ (name, found, 0) -@step('check initial statistics for (\S+)') -def check_init_statistics(step, name): +@step('check initial statistics for (\S+)( with cmdctl port \d+)?') +def check_init_statistics(step, name, cmdctl_port): """ check the initial statistics for the module Parameters: name ('module '): The name of the module (case sensitive!) + cmdctl_port ('with cmdctl port ', optional): cmdctl port to send + the command to. """ - query_str = 'When I query statistics of bind10 module %s with cmdctl' % name + query_str = 'query statistics of bind10 module ' + name + if cmdctl_port: + query_str = query_str + cmdctl_port notcontain_str = 'last bindctl output should not contain "%s"' - check_str = 'The statistics counters are 0 in category .' + name + check_str = 'statistics counters are 0 in category .' + name step.given(query_str) step.given(notcontain_str % 'error') step.given(notcontain_str % 'example.org.') diff --git a/tests/lettuce/features/xfrin_notify_handling.feature b/tests/lettuce/features/xfrin_notify_handling.feature index 80e5258faa..587b76402c 100644 --- a/tests/lettuce/features/xfrin_notify_handling.feature +++ b/tests/lettuce/features/xfrin_notify_handling.feature @@ -22,7 +22,7 @@ Feature: Xfrin incoming notify handling # # Test1 for Xfrout statistics # - check initial statistics for Xfrout + check initial statistics for Xfrout with cmdctl port 47804 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 | @@ -118,7 +118,7 @@ Feature: Xfrin incoming notify handling # # Test1 for Xfrout statistics # - check initial statistics for Xfrout + check initial statistics for Xfrout with cmdctl port 47804 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 | @@ -214,7 +214,7 @@ Feature: Xfrin incoming notify handling # # Test1 for Xfrout statistics # - check initial statistics for Xfrout + check initial statistics for Xfrout with cmdctl port 47804 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 | @@ -319,7 +319,7 @@ Feature: Xfrin incoming notify handling # # Test1 for Xfrout statistics # - check initial statistics for Xfrout + check initial statistics for Xfrout with cmdctl port 47804 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 |