diff --git a/galaxy_ng/tests/integration/api/test_artifact_upload.py b/galaxy_ng/tests/integration/api/test_artifact_upload.py index 33254d2bc7..e86bedf736 100644 --- a/galaxy_ng/tests/integration/api/test_artifact_upload.py +++ b/galaxy_ng/tests/integration/api/test_artifact_upload.py @@ -393,10 +393,18 @@ def test_ansible_lint_exception_AAH_2606(galaxy_client, hub_version): "plugins/modules/lm_otel_collector.py validate-modules:use-run-command-not-popen\n" expected = [ + ( - "meta/runtime.yml:1: meta-runtime[unsupported-version]:" - + " requires_ansible key must be set to a supported version." + ( + "meta/runtime.yml:1: meta-runtime[unsupported-version]:" + + " requires_ansible key must be set to a supported version." + ), + ( + "meta/runtime.yml:1: meta-runtime[unsupported-version]:" + + " 'requires_ansible' key must refer to a currently supported version such as:" + ), ), + ( "meta/runtime.yml:1: yaml[new-line-at-end-of-file]:" + " No new line character at the end of file" @@ -419,8 +427,17 @@ def test_ansible_lint_exception_AAH_2606(galaxy_client, hub_version): resp = wait_for_task(gc, resp) log_messages = [item["message"] for item in resp["messages"]] log_messages = "\n".join(log_messages) - for line in expected: - assert line in log_messages, log_messages + for lines in expected: + if not isinstance(lines, tuple): + assert lines in log_messages, log_messages + else: + found = False + for line in lines: + if line in log_messages: + found = True + break + if not found: + raise Exception(f"did not find any of {lines} in the log output") @pytest.mark.importer