Skip to content

Commit

Permalink
Add coverage target
Browse files Browse the repository at this point in the history
This is a easy way to run:

    go tool cover -html=cover.out

The reported coverage depends on running one of the test targets (e.g.
make test).

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Jul 30, 2023
1 parent 9e91714 commit 04a1c87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ test-drcluster: generate manifests envtest
test-util-pvc: generate manifests envtest
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers/util -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus PVCS_Util

coverage:
go tool cover -html=cover.out

.PHONY: venv
venv:
hack/make-venv
Expand Down

0 comments on commit 04a1c87

Please sign in to comment.