Skip to content

Commit

Permalink
🌱 Updated the coverage for tests (ossf#2728)
Browse files Browse the repository at this point in the history
- Updated the `Makefile` to include the `-coverpkg=./...` flag when running tests.

[Makefile]
- Changed `SKIP_GINKGO=1 go test -race -covermode=atomic  -coverprofile=unit-coverage.out` to `SKIP_GINKGO=1 go test -race -covermode=atomic  -coverprofile=unit-coverage.out -coverpkg=./...` in the `Makefile`

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: Shofiya2003 <shofiyabootwala@gmail.com>
  • Loading branch information
naveensrinivasan authored and Shofiya2003 committed Mar 10, 2023
1 parent 0c0e047 commit b8a22a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ test: $(test-targets)
unit-test: ## Runs unit test without e2e
# Run unit tests, ignoring e2e tests
# run the go tests and gen the file coverage-all used to do the integration with codecov
SKIP_GINKGO=1 go test -race -covermode=atomic -coverprofile=unit-coverage.out `go list ./...`
SKIP_GINKGO=1 go test -race -covermode=atomic -coverprofile=unit-coverage.out -coverpkg=./... `go list ./...`

unit-test-attestor: ## Runs unit tests on scorecard-attestor
cd attestor; SKIP_GINKGO=1 go test -covermode=atomic -coverprofile=unit-coverage.out `go list ./...`; cd ..;
Expand Down

0 comments on commit b8a22a6

Please sign in to comment.