Skip to content

Enable unit test actions#226

Merged
donatwork merged 4 commits into
mainfrom
1422-unity-test-cleanup
Aug 15, 2024
Merged

Enable unit test actions#226
donatwork merged 4 commits into
mainfrom
1422-unity-test-cleanup

Conversation

@donatwork

Copy link
Copy Markdown
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
Copy Markdown
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
@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