Skip to content

Commit

Permalink
unittest: Switch to go run
Browse files Browse the repository at this point in the history
As with the functest target this change now moves the unittest target
over to running ginkgo with go run. It also drops any attempt to run
test suites under ./api/ as no such suites exist in the current
codebase.

Signed-off-by: Lee Yarwood <[email protected]>
  • Loading branch information
lyarwood committed Mar 1, 2023
1 parent 498a379 commit b1f9f04
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ endif

all: manager

GINKGO_VERSION ?= v2.8.3
GINKGO_TIMEOUT ?= 2h
GINKGO_RUN ?= go run github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION) -v -coverprofile cover.out -timeout $(GINKGO_TIMEOUT)

.PHONY: unittest
unittest: generate lint fmt vet manifests
go test -v -coverprofile cover.out $(SRC_PATHS_TESTS)
cd api && go test -v ./...
unittest: ginkgo generate lint fmt vet manifests
$(GINKGO_RUN) $(SRC_PATHS_TESTS)

.PHONY: build-functests
build-functests:
go test -c ./tests

GINKGO_VERSION ?= v2.8.3
GINKGO_TIMEOUT ?= 2h

.PHONY: ginkgo
ginkgo: getginkgo vendor

Expand All @@ -104,7 +104,7 @@ getginkgo:

.PHONY: functest
functest: ginkgo generate fmt vet manifests
go run github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION) -v -coverprofile cover.out -timeout $(GINKGO_TIMEOUT) ./tests/...
$(GINKGO_RUN) ./tests/...

# Build manager binary
.PHONY: manager
Expand Down

0 comments on commit b1f9f04

Please sign in to comment.