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

Moving from Golang 1.21.0 to 1.22.2 Test Coverage changes #91

Open
frankjkelly opened this issue Jun 18, 2024 · 1 comment
Open

Moving from Golang 1.21.0 to 1.22.2 Test Coverage changes #91

frankjkelly opened this issue Jun 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@frankjkelly
Copy link

For Golang 1.21.0 I get

make check-coverage-html
go install github.com/vladopajic/go-test-coverage/v2@latest
go: github.com/vladopajic/go-test-coverage/[email protected] requires go >= 1.22; switching to go1.22.4
.
.
/Users/fkelly/go/bin/go-test-coverage --config=./.testcoverage.yml
File coverage threshold (55%) satisfied:	PASS
Package coverage threshold (55%) satisfied:	PASS
Total coverage threshold (74%) satisfied:	PASS
Total test coverage: 75%

For Golang 1.22.2 I get

go install github.com/vladopajic/go-test-coverage/v2@latest
go: github.com/vladopajic/go-test-coverage/[email protected] requires go >= 1.22; switching to go1.22.4
.
.
/Users/fkelly/go/bin/go-test-coverage --config=./.testcoverage.yml
File coverage threshold (55%) satisfied:	FAIL
  below threshold:				coverage:	threshold:
  cmd/workflow_manager/main.go			0%		55%

Package coverage threshold (55%) satisfied:	FAIL
  below threshold:				coverage:	threshold:
  cmd/workflow_manager				0%		55%

Total coverage threshold (74%) satisfied:	FAIL
Total test coverage: 70%
make: *** [check-coverage] Error 1

Looks like files that were previously not being included are now included?

@vladopajic
Copy link
Owner

hello @frankjkelly, thanks for reporting issue.

could you provide more info?

  1. please confirm that code was not changed when these two coverage where generated
  2. the same arguments where used to generate coverage profile using go command -coverpkg=./... etc...
  3. can you compare coverage profile generated in both cases (they should be the same)

@vladopajic vladopajic added the bug Something isn't working label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants