Skip to content

Commit 66cc9dd

Browse files
author
Jeff Peeler
committed
feat(unit): allow specific unit test execution
This mirrors what's currently done for e2e tests. Although unit test execution is much faster, being able to specify a single test for repeated refinement still saves time.
1 parent 5a87338 commit 66cc9dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ IMAGE_REPO := quay.io/operator-framework/olm
1515
IMAGE_TAG ?= "dev"
1616
KUBE_DEPS := api apiserver apimachinery apiextensions-apiserver kube-aggregator code-generator cli-runtime
1717
KUBE_RELEASE := release-1.12
18+
SPECIFIC_UNIT_TEST := $(if $(TEST),-run $(TEST),)
1819

1920
.PHONY: build test run clean vendor schema-check \
2021
vendor-update coverage coverage-html e2e .FORCE
@@ -24,7 +25,7 @@ all: test build
2425
test: clean cover.out
2526

2627
unit:
27-
go test $(MOD_FLAGS) -v -race -tags=json1 -count=1 ./pkg/...
28+
go test $(MOD_FLAGS) $(SPECIFIC_UNIT_TEST) -v -race -tags=json1 -count=1 ./pkg/...
2829

2930
schema-check:
3031

0 commit comments

Comments
 (0)