From: Naoki Kambe Date: Thu, 21 Mar 2013 06:38:08 +0000 (+0900) Subject: [2252] generalize the module name as an argument of check_init_statistics() X-Git-Tag: bind10-1.2.0beta1-release~474^2~4^2~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c37fd56ccccd540bde166eb7f29c2c691bbff154;p=thirdparty%2Fkea.git [2252] generalize the module name as an argument of check_init_statistics() not need to specify the category name with the module name respectively, check all statistics items of the module from the top level of the tree. --- diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py index 2418ca9725..c43af98d94 100644 --- a/tests/lettuce/features/terrain/bind10_control.py +++ b/tests/lettuce/features/terrain/bind10_control.py @@ -438,24 +438,17 @@ 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 (Xfrin|Xfrout)') -def check_init_statistics(step, module): +@step('check initial statistics for (\S+)') +def check_init_statistics(step, name): """ - check the initial statistics for Xfrin or Xfrout. + check the initial statistics for the module Parameters: - module : Xfrin or Xfrout + name ('module '): The name of the module (case sensitive!) """ - query_str = 'When I query statistics %%s of bind10 module %s with cmdctl' % module + query_str = 'When I query statistics of bind10 module %s with cmdctl' % name 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') + check_str = 'The statistics counters are 0 in category .' + name + step.given(query_str) 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) + step.given(check_str)