Skip to content

Commit

Permalink
Merge pull request #256 from mgoerens/adjust_timeout_message
Browse files Browse the repository at this point in the history
Adjust expected timeout message and accept regex in expected message
  • Loading branch information
komish authored Sep 18, 2023
2 parents dc057c3 + 55435a3 commit a06a729
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
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

0 comments on commit a06a729

Please sign in to comment.