knative / knative/test-infra

report_go_test does not fail when there are no tests

Open
#2,079 3 comments 0 reactions 0 assignees View on GitHub
bug lifecycle/frozen
Dominant language
Go
Stars
83
Forks
160
PR merge metrics
No merged PRs in 30d

Description

When the test package does not contain any tests, the [report_go_test](https://github.com/knative/test-infra/blob/65144e695d277847c51c08f5008cd39f59b931e4/scripts/library.sh#L415) function reports as success the test flow still passes even when there is error.

https://knative.slack.com/archives/CA1DTGZ2N/p1589561963210900 is the discussion on Slack.

Contributor guide

Open the contributing guide

Research direction

Start in scripts/library.sh at the report_go_test function, then reproduce the flow with a test package containing no tests and inspect how its result is handled. Done means the flow reports failure rather than success when the package has no tests or returns an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, shell
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.