Skip to content

Fix: Use MatchError() from Gomega to compare errors#30

Merged
exe-prow-github-app[bot] merged 2 commits into
opdev:mainfrom
OchiengEd:match_error
Mar 6, 2026
Merged

Fix: Use MatchError() from Gomega to compare errors#30
exe-prow-github-app[bot] merged 2 commits into
opdev:mainfrom
OchiengEd:match_error

Conversation

@OchiengEd

Copy link
Copy Markdown
Contributor

Comparing errors messages can be finicky. Switched to using MatchError() to prevent need to update tests when error messages change.

In addition, fixed a check on a nil error and reworded an error message.

Gomega provides a MatchError() which is comparable to Golang's errors.Is
for checking errors.

Signed-off-by: Edmund Ochieng <ochienged@gmail.com>
Signed-off-by: Edmund Ochieng <ochienged@gmail.com>
@exe-prow-github-app
exe-prow-github-app Bot requested a review from dhoover103 March 4, 2026 23:30
@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: OchiengEd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2026
@mrhillsman

Copy link
Copy Markdown
Contributor

/lgtm

all tests are passing now

Resolves #31
Fixes #32
Fixes #33

@exe-prow-github-app exe-prow-github-app Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2026
@exe-prow-github-app
exe-prow-github-app Bot merged commit 5c750a9 into opdev:main Mar 6, 2026
1 check passed
@OchiengEd
OchiengEd deleted the match_error branch March 6, 2026 22:11
@mrhillsman
mrhillsman requested review from mrhillsman and removed request for dhoover103 March 6, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants