-
Notifications
You must be signed in to change notification settings - Fork 43
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
fix: don't upsert empty tags as valid value #1025
Conversation
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Should we add a quick test for this? https://github.com/stacklok/mediator/blob/main/internal/controlplane/handlers_githubwebhooks_test.go shows some examples of mocking the database. |
And +1 on adding a test of some sort. |
Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
I'm up for that but let's park it for later 👍 I remember we've talked about this previously when I started creating tests for this exact context and we've decided to leave it for when we refactor the codebase to not be so finicky to mock. |
Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now recall the conversation of it not being trivial to realistically test and us agreeing on doing so via smoke tests instead. I'll hurry thay work up
Fixes an issue of pushing an empty string as valid (causing len(tags) !=0) in case there was only one tag previously and we removed it upon update.