BIND 10 trac1818, updated. 86e48a59cf1c1d4a06f9425d6de7944d73777bed [1853] Fix module_is_running() to check for component exactly
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Apr 4 09:20:45 UTC 2012
The branch, trac1818 has been updated
via 86e48a59cf1c1d4a06f9425d6de7944d73777bed (commit)
from 693ab9a70c5dc1940c213bff8ccf9746d18f8fe9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 86e48a59cf1c1d4a06f9425d6de7944d73777bed
Author: Mukund Sivaraman <muks at isc.org>
Date: Wed Apr 4 14:50:10 2012 +0530
[1853] Fix module_is_running() to check for component exactly
-----------------------------------------------------------------------
Summary of changes:
tests/lettuce/features/terrain/bind10_control.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index 370fb5c..c56afb7 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -148,8 +148,8 @@ def run_bindctl(commands, cmdctl_port=None):
"stderr:\n" + str(stderr)
- at step('last bindctl( stderr)? output should( not)? contain (\S+)')
-def check_bindctl_output(step, stderr, notv, string):
+ at step('last bindctl( stderr)? output should( not)? contain (\S+)( exactly)?')
+def check_bindctl_output(step, stderr, notv, string, exactly):
"""Checks the stdout (or stderr) stream of the last run of bindctl,
fails if the given string is not found in it (or fails if 'not' was
set and it is found
@@ -157,14 +157,19 @@ def check_bindctl_output(step, stderr, notv, string):
stderr ('stderr'): Check stderr instead of stdout output
notv ('not'): reverse the check (fail if string is found)
string ('contain <string>') string to look for
+ exactly ('exactly'): Make an exact match delimited by whitespace
"""
if stderr is None:
output = world.last_bindctl_stdout
else:
output = world.last_bindctl_stderr
found = False
- if string in output:
- found = True
+ if exactly is None:
+ if string in output:
+ found = True
+ else:
+ if re.search(r'^\s+' + string + r'\s+', output, re.IGNORECASE | re.MULTILINE) is not None:
+ found = True
if notv is None:
assert found == True, "'" + string +\
"' was not found in bindctl output:\n" +\
@@ -328,4 +333,4 @@ def module_is_running(step, name, not_str):
if not_str is None:
not_str = ""
step.given('send bind10 the command help')
- step.given('last bindctl output should' + not_str + ' contain ' + name)
+ step.given('last bindctl output should' + not_str + ' contain ' + name + ' exactly')
More information about the bind10-changes
mailing list