Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clowder thingy is optional in output #539

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions features/steps/notification_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def start_ccx_notification_writer_with_flag(context, flag):

def check_help_from_ccx_notification_writer(context):
"""Check if help is displayed by CCX Notification Writer."""
expected_output = """Clowder is not enabled, skipping init...
# please take into account that some lines can be (and are) added into output by
# app-common-go library. We can't control the output and it have changed already.
expected_output = """
Usage of ccx-notification-writer:
-authors
show authors
Expand Down Expand Up @@ -112,10 +114,11 @@ def check_help_from_ccx_notification_writer(context):
assert isinstance(stdout, str), "wrong type of stdout object"

# don't mess with silly tabs

updated_output = stdout.replace("\t", " ").strip()
# check the output
assert updated_output == expected_output.strip(), f"{stdout} != {expected_output}"

# check if the output contains expected help message
# any optional garbage above and below help message is ignored
assert expected_output.strip() in updated_output, f"{updated_output} != \n{expected_output}"


def check_version_from_ccx_notification_writer(context):
Expand Down