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

Further enhancing webhook handler tests. #3414

Merged
merged 1 commit into from
May 26, 2024
Merged

Conversation

blkt
Copy link
Contributor

@blkt blkt commented May 23, 2024

Summary

This PR only adds tests and there are no changes to business logic.

Specifically

  • interaction with the database is tested accurately
  • message lookup on Minder internal topics is not on a per-test basis
  • message payloads checks are on a per-test basis
  • added a couple more test cases

Change Type

Test improvement.

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@blkt blkt self-assigned this May 23, 2024
@blkt blkt requested a review from a team as a code owner May 23, 2024 16:11
@coveralls
Copy link

coveralls commented May 23, 2024

Coverage Status

coverage: 51.975% (+0.06%) from 51.912%
when pulling 8e00b04 on webhook-further-testing
into 06ab7d4 on main.

Specifically
* interaction with the database is tested accurately
* message lookup on Minder internal topics is not on a per-test basis
* message payloads checks are on a per-test basis
* added a couple more test cases
@blkt blkt force-pushed the webhook-further-testing branch from f43b327 to 8e00b04 Compare May 24, 2024 08:17
@@ -52,9 +53,12 @@ import (
"github.com/stacklok/minder/internal/util/testqueue"
)

//go:embed package-published.json
//go:embed test-payloads/package-published.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, definitely going to use this pattern in future.

@blkt blkt merged commit 586144c into main May 26, 2024
20 checks passed
@blkt blkt deleted the webhook-further-testing branch May 26, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants