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

Improve EventMesh Tests for Better error comparison #335

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

muralov
Copy link
Contributor

@muralov muralov commented Dec 14, 2023

Description
Improve EventMesh tests

Changes proposed in this pull request:

  • Don't use require.ErrorAs as it only compares types. Instead error should be compared properly.
  • Change business logic to make it mockable

Related issue(s)
#334

@muralov muralov requested a review from a team as a code owner December 14, 2023 14:59
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 14, 2023
@muralov muralov force-pushed the fix-eventmesh-tests branch from 717231e to 1fa20e6 Compare December 14, 2023 15:05
@kyma-bot kyma-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 15, 2023
@muralov muralov force-pushed the fix-eventmesh-tests branch 2 times, most recently from 6fb8ffa to 4f69db8 Compare December 15, 2023 06:54
@muralov muralov linked an issue Dec 15, 2023 that may be closed by this pull request
@muralov muralov force-pushed the fix-eventmesh-tests branch from 71ab869 to 4f69db8 Compare December 18, 2023 08:49
require.ErrorAs only compares types. Instead erro should be compared properly.
@muralov muralov force-pushed the fix-eventmesh-tests branch 2 times, most recently from 7c57bfe to c7e1ec3 Compare December 18, 2023 13:21
@muralov muralov force-pushed the fix-eventmesh-tests branch 2 times, most recently from 852cf25 to 75b25fd Compare December 18, 2023 13:50
@muralov muralov force-pushed the fix-eventmesh-tests branch from 75b25fd to e202d94 Compare December 18, 2023 14:00
@kyma-bot kyma-bot added the lgtm Looks good to me! label Dec 19, 2023
@kyma-bot kyma-bot merged commit eba1d2c into kyma-project:main Dec 19, 2023
8 checks passed
@muralov muralov deleted the fix-eventmesh-tests branch December 19, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix tests in eventmesh_test.go
3 participants