]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2252] add a port number of cmdctl as an option of check_init_statistics()
authorNaoki Kambe <kambe@jprs.co.jp>
Thu, 21 Mar 2013 06:35:19 +0000 (15:35 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Thu, 21 Mar 2013 09:52:38 +0000 (18:52 +0900)
tests/lettuce/features/terrain/bind10_control.py
tests/lettuce/features/xfrin_notify_handling.feature

index c43af98d94949da6a6134020453940b3adb43df8..5c22384f1d24ec08ed3a49a8abd43f3a84b602ab 100644 (file)
@@ -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 <name>'): The name of the module (case sensitive!)
+    cmdctl_port ('with cmdctl port <portnr>', 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.')
index 80e5258faa8b62d8eb536c19e5b739eb045f4fed..587b76402cd651d886f48e6ca5afd1e06d9eda46 100644 (file)
@@ -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 |