Skip to content

Commit ec06dcd

Browse files
committed
Add test coverage
Signed-off-by: Ashima-Ashima1 <[email protected]>
1 parent 8cafabd commit ec06dcd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ vet: ## Run go vet against code.
107107

108108
.PHONY: test
109109
test: manifests generate fmt vet envtest ## Run tests.
110-
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out
110+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)"
111+
go test -coverprofile=coverage.out ./...
112+
113+
coverage: test
114+
cat coverage.out | grep -v /controllers/fake/ > cover.out; go tool cover -html=cover.out
111115

112116
##@ Build
113117

0 commit comments

Comments
 (0)