-
Notifications
You must be signed in to change notification settings - Fork 2k
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 nap unit tests #1589
Improve nap unit tests #1589
Conversation
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.
Great change! There's a lot of very clear tests.
internal/k8s/handlers.go
Outdated
@@ -523,6 +523,7 @@ func createAppProtectPolicyHandlers(lbc *LoadBalancerController) cache.ResourceE | |||
return handlers | |||
} | |||
|
|||
// compareSpecs returns true if the resources are different. | |||
func compareSpecs(oldresource, resource *unstructured.Unstructured) (bool, error) { |
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.
Would it help to rename the function "areResourcesDifferent" ?
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.
good suggestion
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.
Nice work!
345543d
to
e6cd9fa
Compare
Proposed changes
Add unit tests/improve existing ones for AppProtect related code