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

Event comparison during unit testing does not match the expected result #6306

Closed
l-qing opened this issue Mar 7, 2023 · 0 comments · Fixed by #6296
Closed

Event comparison during unit testing does not match the expected result #6306

l-qing opened this issue Mar 7, 2023 · 0 comments · Fixed by #6296
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@l-qing
Copy link
Member

l-qing commented Mar 7, 2023

Expected Behavior

Using the original event message matches correctly.

Actual Behavior

Using the original event message did not successfully match.

Steps to Reproduce the Problem

  1. Code:
    wantEvents := []string{
    "Normal Started",
    "Normal Running Tasks Completed: 0 \\(Failed: 0, Cancelled 0\\), Incomplete: 1, Skipped: 0",
    }
    _, clients := prt.reconcileRun("test", prName, wantEvents, false)
  2. Escaping () is necessary to matc
  3. If equal matching is supported, escaping is not necessary. Can be written as:
    Normal Running Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0

Additional Info

@l-qing l-qing added the kind/bug Categorizes issue or PR as related to a bug. label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant