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 tests for PrecheckPowerScale() #48

Merged
merged 3 commits into from
Feb 24, 2022
Merged

Conversation

jooseppi-luna
Copy link
Contributor

@jooseppi-luna jooseppi-luna commented Feb 23, 2022

Description

  • Added unit tests for PrecheckPowerScale(), bringing pkg/drivers coverage up to 95%.
  • Did some minor refactoring by passing PrecheckPowerScale() a client instead of a whole reconciler, since it only uses the client. This makes the code more efficient and much easier to test.
  • Bumped up coverage threshold in actions to 90%.

GitHub Issues

dell/csm#159

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Ran tests and confirmed passing. Also checked coverage report as a sanity check.

@jooseppi-luna jooseppi-luna changed the title PrecheckPowerScale tests working Add tests for PrecheckPowerScale() Feb 23, 2022
abhi16394
abhi16394 previously approved these changes Feb 23, 2022
pkg/drivers/powerscale.go Outdated Show resolved Hide resolved
@bharathsreekanth bharathsreekanth merged commit 6b8e209 into main Feb 24, 2022
@jooseppi-luna jooseppi-luna deleted the precheck-pscale-unit-test branch February 25, 2022 16:51
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.

5 participants