nginx-gateway-fabric
nginx-gateway-fabric copied to clipboard
Unit tests when ran together do not provide helpful information upon failure
When running unit tests together, like through the make unit-test
command, the failure is difficult to find. The summary of the test results do not contain any information on which test(s) failed. For example:
There were failures detected in the following suites:
config ./internal/mode/static/nginx/config
Test Suite Failed
exit status 1
make: *** [unit-test] Error 1
Although logs are printed, these are difficult to parse as they are extremely lengthy. The test failure is buried in this output and is hard to find.
=== NAME TestExecuteMainIncludesConfig/complete_configuration
main_includes_test.go:67:
Expected
<int>: 1
to equal
<int>: 0
Examples:
- https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/11019924001/job/30603633017?pr=2522
Acceptance Criteria:
- Name of failed test is printed in an easy to find location
- Stack trace is printed (if possible)
Dev Notes:
- Issue started to occur when we started running all our unit tests with ginkgo. Can we just run our ginkgo tests using ginkgo and the rest of our tests with go test?
- Running the tests in parallel has made fixing this issue more of a priority.