BIND 10 trac1290, updated. dd7fb442ed97cc469db4275fdc3d4628cd44ea79 [1290] allow examination of past b10 output
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Oct 19 12:15:13 UTC 2011
The branch, trac1290 has been updated
via dd7fb442ed97cc469db4275fdc3d4628cd44ea79 (commit)
from 032f9633f4a353c11d0d855984aad0f0392a6ac1 (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 dd7fb442ed97cc469db4275fdc3d4628cd44ea79
Author: Jelte Jansen <jelte at isc.org>
Date: Wed Oct 19 14:14:39 2011 +0200
[1290] allow examination of past b10 output
-----------------------------------------------------------------------
Summary of changes:
tests/lettuce/features/bind10_control.py | 14 +++++++++++++-
tests/lettuce/features/steps.py | 5 ++++-
2 files changed, 17 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/tests/lettuce/features/bind10_control.py b/tests/lettuce/features/bind10_control.py
index 3af799e..2a85e4d 100644
--- a/tests/lettuce/features/bind10_control.py
+++ b/tests/lettuce/features/bind10_control.py
@@ -8,12 +8,24 @@ def shutdown_server():
world.bind10.wait()
world.bind10 = None
+def check_lines(output, lines):
+ for line in lines:
+ if output.find(line) != -1:
+ return line
+
@world.absorb
-def wait_for_output_lines(lines):
+def wait_for_output_lines(lines, examine_past = True):
assert world.bind10 is not None
+ if examine_past:
+ for output in world.bind10_output:
+ for line in lines:
+ if output.find(line) != -1:
+ return line
found = False
while not found:
output = world.bind10.stderr.readline()
+ # store any line, for examine_skipped
+ world.bind10_output.append(output)
for line in lines:
if output.find(line) != -1:
return line
diff --git a/tests/lettuce/features/steps.py b/tests/lettuce/features/steps.py
index a4e02d9..1c07f25 100644
--- a/tests/lettuce/features/steps.py
+++ b/tests/lettuce/features/steps.py
@@ -7,14 +7,17 @@ def initialize(feature):
# just make sure our cleanup won't fail if we never did
# run the bind10 instance
world.bind10 = None
+ world.bind10_output = []
@after.each_scenario
def cleanup(feature):
world.shutdown_server()
+ world.bind10_output = []
@step(u'Given I have no database')
def given_i_have_no_database(step):
- assert not os.path.exists("test.db")
+ if os.path.exists("test.db"):
+ os.remove("test.db")
@step(u'I should see a database file')
def i_should_see_a_database_file(step):
More information about the bind10-changes
mailing list