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

To include pkg tests in the coverage #3171

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

cniackz
Copy link
Collaborator

@cniackz cniackz commented Dec 26, 2023

Objective:

To execute and include the pkg tests in the coverage as they are currently excluded from our CI/CD Pipeline.

Problem:

Currently, when we execute the tests, they are not included:

$ GO111MODULE=on go test -test.v -coverprofile=coverage/coverage-pkg.out
?   	github.com/minio/console/pkg	[no test files]

Root Cause:

This is because the tests are distributed in the sub-folders, hence we need to use go test ./... to include the tests in the sub-folders as stated in https://stackoverflow.com/questions/19200235/golang-tests-in-sub-directory

Additional information:

This change is unrelated to the failure observed in func TestToEntry(t *testing.T) { and that test was introduced long time ago but we never debugged when started to fail. So for this PR, I am going to suggest its temporal removal and in a separate PR when can degub that test further.

@cniackz cniackz self-assigned this Dec 26, 2023
@cniackz cniackz requested a review from dvaldivia December 26, 2023 19:04
@cniackz cniackz added the bug this needs to be fixed label Dec 26, 2023
@cniackz cniackz force-pushed the testing-coverage-1 branch 2 times, most recently from 4e4720c to 38c7604 Compare December 26, 2023 19:21
@cniackz cniackz changed the title Execute and include pkg tests in the coverage To include pkg tests in the coverage Dec 26, 2023
@dvaldivia dvaldivia merged commit a281fe1 into minio:master Dec 26, 2023
29 of 30 checks passed
cesnietor pushed a commit to cesnietor/console that referenced this pull request Jan 12, 2024
Execute and include pkg tests in the coverage
cesnietor pushed a commit to cesnietor/console that referenced this pull request Jan 12, 2024
Execute and include pkg tests in the coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this needs to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants