Skip to content

Commit cb3f0eb

Browse files
nirrozenbaumkfswain
authored andcommitted
added a target dedicated for running unit-test only (kubernetes-sigs#739)
* added a target dedicated for running unit-test only. this is very useful during development. Signed-off-by: Nir Rozenbaum <[email protected]> * code review Signed-off-by: Nir Rozenbaum <[email protected]> --------- Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent da4a9f4 commit cb3f0eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ vet: ## Run go vet against code.
123123
test: manifests generate fmt vet envtest image-build ## Run tests.
124124
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -race -coverprofile cover.out
125125

126+
.PHONY: test-unit
127+
test-unit: ## Run unit tests.
128+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./pkg/... -race -coverprofile cover.out
129+
126130
.PHONY: test-integration
127-
test-integration: ## Run tests.
131+
test-integration: ## Run integration tests.
128132
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./test/integration/epp/... -race -coverprofile cover.out
129133

130134
.PHONY: test-e2e

0 commit comments

Comments
 (0)