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

Increase unit test coverage #785

Merged

Conversation

donatwork
Copy link
Contributor

@donatwork donatwork commented Nov 18, 2024

Description

This is a joint effort to increase the unit test coverage to meet the unit test threshold.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1559

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 80% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (N/A)
  • 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

  • Unit tests are performed and passing at the threshold set by the relevant GitHub action.

ChristianAtDell and others added 30 commits November 7, 2024 16:31
pkg/utils/utils.go Outdated Show resolved Hide resolved
@ChristianAtDell
Copy link
Contributor

I will go and remove all of the known useless comment chunks and resolve those conversations.

@ChristianAtDell ChristianAtDell merged commit a51fbb3 into pub/utils-coverage-intermediary Nov 19, 2024
7 checks passed
@ChristianAtDell ChristianAtDell deleted the pub/increase-utils-coverage branch November 19, 2024 14:28
Comment on lines +56 to +59
// Check that the ConfigMap has the correct data
if foundConfigMap.Data["key"] != configMap.Data["key"] {
t.Errorf("ConfigMap has incorrect data: expected %s, got %s", configMap.Data["key"], foundConfigMap.Data["key"])
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This works, but it is also redundant, since assert.Equals calls reflect.DeepEqual internally.

@ChristianAtDell ChristianAtDell mentioned this pull request Nov 19, 2024
8 tasks
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.