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

Enable unit test actions #226

Merged
merged 4 commits into from
Aug 15, 2024
Merged

Enable unit test actions #226

merged 4 commits into from
Aug 15, 2024

Conversation

donatwork
Copy link
Contributor

Description

Enable the running of unit tests for build in the GItHub actions. Most of the unit tests are not true unit tests as they require to be run via a shell script with an environment file. I ended up renaming the test/unit-test directory to bdd-test and modified the Makefile to have a new target for bdd-test and unit-test.

Since many unit tests are broken, and not in scope for this PR, I setup the actions to only run tests in service/utils. We will have to eventually decide if we want to fix the unit tests so that they can be run as an action. Right now I'm getting 24.6% coverage but it is a lot of work to get to 80-90%. At least we can get started with this PR.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
(1422)[https://github.com/dell/csm/issues/1422]

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 --> They were 0%
  • 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
  • Backward compatibility is not broken

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 and builds.

@donatwork
Copy link
Contributor Author

Looks like the linter got updated yesterday to 1.60.1 and some new issues are found. An initial look indicates issues with passing non const format parameters to printf related functions. That exceeds the scope of what I had planned to accomplish.

@donatwork donatwork merged commit 756d20e into main Aug 15, 2024
4 of 5 checks passed
@donatwork donatwork deleted the 1422-unity-test-cleanup branch August 15, 2024 13:20
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