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

UTs added for mount secret case, updated for config map as well #444

Conversation

bharathsreekanth
Copy link
Contributor

@bharathsreekanth bharathsreekanth commented Feb 4, 2025

Description

Unit tests updated for mount secret/credential. The test framework is a bit different as to enable more accurate reporting of the coverage. A single TestMain running both the secret and config map case reported coverage for only one of them (due to how go's coverage tool is).
A main test function now serializes how the tests are run that have a dependency of requiring a mock proxy server.

GitHub Issues

List the GitHub issues impacted by this PR:

| GitHub Issue # |
(dell/csm#1614)

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?

Unit tests run for both secret and config map case.

PASS
coverage: 69.8% of statements
ok github.com/dell/csi-powermax/csireverseproxy/v2 60.492s coverage: 69.8% of statements

csireverseproxy/main_test.go Outdated Show resolved Hide resolved
csireverseproxy/main_test.go Outdated Show resolved Hide resolved
@bharathsreekanth bharathsreekanth merged commit f9981c2 into usr/spark/mount-credentials Feb 4, 2025
6 of 7 checks passed
@bharathsreekanth bharathsreekanth deleted the usr/sreekb/reverseproxy-unit-tests branch February 4, 2025 14:55
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