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

refactor unit test #49

Merged
merged 7 commits into from
Feb 24, 2022
Merged

refactor unit test #49

merged 7 commits into from
Feb 24, 2022

Conversation

yifeijin
Copy link
Contributor

@yifeijin yifeijin commented Feb 23, 2022

Description

  • adds more unit test for controllers.go and coverage is now 66%. There are still many edge cases need to be hit.
  • Refactors the test file to reduce duplicate code.
  • In controller.go, remove finalizer after everything is deleted instead of before. Refactor to if err = ...; err != nil style

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
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?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Test A
  • Test B

jooseppi-luna
jooseppi-luna previously approved these changes Feb 23, 2022
Copy link
Contributor

@jooseppi-luna jooseppi-luna left a comment

Choose a reason for hiding this comment

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

LGTM in general but I will defer to Jai's comments. If any changes go in message me and I'll re-review

jooseppi-luna
jooseppi-luna previously approved these changes Feb 24, 2022
JacobGros
JacobGros previously approved these changes Feb 24, 2022
@yifeijin yifeijin dismissed stale reviews from JacobGros and jooseppi-luna via bd24711 February 24, 2022 15:54
@yifeijin yifeijin merged commit ce25306 into main Feb 24, 2022
@yifeijin yifeijin deleted the refactor-unit-test branch February 24, 2022 16:10
ChristianAtDell added a commit that referenced this pull request Oct 15, 2024
* refactor unit test

* address comments

* gofmt

* address comments

* fix testing

* update event logging
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