From 0c090b3cf0fa7daf289465f5261d73358b53ae76 Mon Sep 17 00:00:00 2001 From: Naveen <172697+naveensrinivasan@users.noreply.github.com> Date: Tue, 7 Mar 2023 16:26:58 -0600 Subject: [PATCH] :seedling: Updated the coverage for tests (#2728) - 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> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d60a3570..25d5e237 100644 --- a/Makefile +++ b/Makefile @@ -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 ..;