aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--src/k8splugin/Makefile7
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index e4c62a1e..a9a06af0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
.tox/
.*.swp
*.log
+coverage.html
# Directories
pkg
diff --git a/src/k8splugin/Makefile b/src/k8splugin/Makefile
index 510ac163..0bc0cd55 100644
--- a/src/k8splugin/Makefile
+++ b/src/k8splugin/Makefile
@@ -24,7 +24,7 @@ all: clean dep
# no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with
# mock plugin errors out for unit tests. So the seperation avoids the error.
-build: clean dep plugins test
+build: clean dep plugins test cover
deploy: build
.PHONY: test
@@ -52,3 +52,8 @@ dep:
clean:
find . -name "*so" -delete
@rm -f k8plugin
+
+.PHONY: cover
+cover:
+ @go test -tags 'unit' ./... -coverprofile=coverage.out
+ @go tool cover -html=coverage.out -o coverage.html