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 nap unit tests #1589

Merged
merged 7 commits into from
May 17, 2021
Merged

Improve nap unit tests #1589

merged 7 commits into from
May 17, 2021

Conversation

pleshakov
Copy link
Contributor

Proposed changes

Add unit tests/improve existing ones for AppProtect related code

Copy link
Contributor

@soneillf5 soneillf5 left a 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.

@@ -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) {
Copy link
Contributor

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" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion

Copy link
Contributor

@rafwegv rafwegv left a comment

Choose a reason for hiding this comment

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

Nice work!

@pleshakov pleshakov merged commit 12a0296 into master May 17, 2021
@pleshakov pleshakov deleted the improve-nap-unit-tests branch May 17, 2021 20:08
@ciarams87 ciarams87 added the chore Pull requests for routine tasks label Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants