Skip to content

Unit tests when ran together do not provide helpful information upon failure #2584

Closed
@bjee19

Description

@bjee19

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:

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtestsPull requests that update tests

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions