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

Adjust expected timeout message and accept regex in expected message #256

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: Chart test takes longer time and exceeds default timeout

@partners @full
Examples:
| vendor_type | vendor | chart_path | message |
| partners | hashicorp | tests/data/vault-test-timeout-0.17.0.tgz | * timed out waiting for the condition |
| vendor_type | vendor | chart_path | message |
| partners | hashicorp | tests/data/vault-test-timeout-0.17.0.tgz | (timeout has expired\|timed out waiting for the condition) |

@community @full
Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Utility class for setting up and manipulating certification workflow tests."""

import os
import re
import json
import pathlib
import shutil
Expand Down Expand Up @@ -910,7 +911,7 @@ def check_pull_request_comments(self, expect_message: str):
raise AssertionError(f"No comment found in the PR {self.secrets.pr_number}")
complete_comment = response[0]["body"]

if expect_message in complete_comment:
if re.search(expect_message, complete_comment):
logging.info("Found the expected comment in the PR")
else:
raise AssertionError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Chart test takes longer time and exceeds default timeout

Examples:
| vendor_type | vendor | message |
| partners | hashicorp | * timed out waiting for the condition |
| partners | hashicorp | (timeout has expired\|timed out waiting for the condition) |
| community | redhat | Community charts require maintainer review and approval, a review will be conducted shortly |

Scenario Outline: [HC-16-002] A redhat associate submits a chart that takes more than 30 mins
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/utils/chart_certification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Utility class for setting up and manipulating certification workflow tests."""

import os
import re
import json
import pathlib
import shutil
Expand Down Expand Up @@ -818,7 +819,7 @@ def check_pull_request_comments(self, expect_message: str):
response = json.loads(r.text)
complete_comment = response[0]["body"]

if expect_message in complete_comment:
if re.search(expect_message, complete_comment):
logging.info("Found the expected comment in the PR")
else:
pytest.fail(
Expand Down
Loading