Fix failing tests and linting issues

This commit is contained in:
Jonathan Wren 2020-03-28 15:09:40 -07:00
parent 65a3b2ce7c
commit 0e1f415c97
3 changed files with 13 additions and 3 deletions

View file

@ -216,6 +216,15 @@ def check_output_inline(context, text=None, text2=None):
assert text in out or text2 in out, text or text2 assert text in out or text2 in out, text or text2
@then("the error output should contain")
@then('the error output should contain "{text}"')
@then('the error output should contain "{text}" or "{text2}"')
def check_output_inline(context, text=None, text2=None):
text = text or context.text
out = context.stderr_capture.getvalue()
assert text in out or text2 in out, text or text2
@then('the output should not contain "{text}"') @then('the output should not contain "{text}"')
def check_output_not_inline(context, text): def check_output_not_inline(context, text):
out = context.stdout_capture.getvalue() out = context.stdout_capture.getvalue()

View file

@ -45,6 +45,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x
Y Y
""" """
Then the output should contain "Error: features/journals/missing.journal does not exist." Then the output should contain "Error: features/journals/missing.journal does not exist."
And we should get no error
Scenario: Upgrade with missing encrypted journal Scenario: Upgrade with missing encrypted journal
Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json" Given we use the config "upgrade_from_195_with_missing_encrypted_journal.json"
@ -52,7 +53,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x
""" """
Y Y
bad doggie no biscuit bad doggie no biscuit
bad doggie no biscuit
""" """
Then the output should contain "Error: features/journals/missing.journal does not exist." Then the output should contain "Error: features/journals/missing.journal does not exist."
and the output should contain "We're all done here" And the error output should contain "We're all done"
And we should get no error