Skip to content

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

Merged
bharathsreekanth merged 4 commits into
usr/spark/mount-credentialsfrom
usr/sreekb/reverseproxy-unit-tests
Feb 4, 2025
Merged

UTs added for mount secret case, updated for config map as well#444
bharathsreekanth merged 4 commits into
usr/spark/mount-credentialsfrom
usr/sreekb/reverseproxy-unit-tests

Conversation

@bharathsreekanth

@bharathsreekanth bharathsreekanth commented Feb 4, 2025

Copy link
Copy Markdown
Contributor

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 # |
(https://github.com/dell/csm/issues/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

Comment thread csireverseproxy/main_test.go Outdated
Comment thread csireverseproxy/main_test.go Outdated
Comment thread csireverseproxy/main_test.go
@bharathsreekanth bharathsreekanth merged commit f9981c2 into usr/spark/mount-credentials Feb 4, 2025
@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