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

Add unit tests to k8sutils package #446

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

lukeatdell
Copy link
Contributor

Description

Add unit tests to k8sutils package to bring coverage above 90%.

Additionally, some small refactoring to the k8sutils package was performed to return the already initialized kube clientset if one was present. This appears to have been the intended operation, based on the var *k8sUtils variable and the logic to return that clientset if it was already set, but because k8sUtils was being redefined in the function, it never operated in that manner.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #

Checklist:

  • Have you run format,vet & lint checks against your submission?
  • Have you made sure that the code compiles?
  • Did you run the unit & integration tests successfully?
  • Have you maintained at least 90% code coverage?
  • Have you commented your code, particularly in hard-to-understand areas
  • Have you done corresponding changes to the documentation
  • Did you run tests in a real Kubernetes cluster?
  • Backward compatibility is not broken

How Has This Been Tested?

Built a new image, deployed and validated using cert-csi certify

@tdawe tdawe merged commit f3c0e49 into usr/spark/unit-test-improvements Feb 5, 2025
6 of 7 checks passed
@tdawe tdawe deleted the usr/lukeatdell/ut-k8sutils branch February 5, 2025 12:34
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