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

Use go test as unit test runner #2613

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

sjberman
Copy link
Contributor

Problem: Switching to using ginkgo as the test runner caused some issues with verbose output and difficulty finding test failures. This could also be exacerbated by the fact that we mix standard go test style with ginkgo framework tests.

Solution: For now, switch back to using go test as the runner, since the output is cleaner and easier to find errors.

Closes #2584

Future work: #2612

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@sjberman sjberman requested a review from a team as a code owner September 26, 2024 17:13
@github-actions github-actions bot added the tests Pull requests that update tests label Sep 26, 2024
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@744ae3b). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2613   +/-   ##
=======================================
  Coverage        ?   88.43%           
=======================================
  Files           ?      104           
  Lines           ?     7880           
  Branches        ?        0           
=======================================
  Hits            ?     6969           
  Misses          ?      854           
  Partials        ?       57           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sjberman
Copy link
Contributor Author

sjberman commented Sep 26, 2024

Hmm, code coverage dropped significantly. Looks like it's considering fake files now?

Makefile Show resolved Hide resolved
@lucacome
Copy link
Member

Hmm, code coverage dropped significantly. Looks like it's considering fake files now?

should we try to exclude them?

@sjberman
Copy link
Contributor Author

should we try to exclude them?

I'm trying to figure out how to do that. Doesn't seem very straightforward. Not sure how it worked with ginkgo...

@sjberman
Copy link
Contributor Author

I might just be able to configure codecov to ignore certain paths.

Problem: Switching to using ginkgo as the test runner caused some issues with verbose output and difficulty finding test failures. This could also be exacerbated by the fact that we mix standard go test style with ginkgo framework tests.

Solution: For now, switch back to using go test as the runner, since the output is cleaner and easier to find errors.
@sjberman sjberman merged commit 4f0e3a6 into nginxinc:main Sep 26, 2024
38 checks passed
@sjberman sjberman deleted the tests/unit-test-runner branch September 26, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that update tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unit tests when ran together do not provide helpful information upon failure
4 participants