Skip to content

Commit

Permalink
Add ginkgo Make target (SeldonIO#3709)
Browse files Browse the repository at this point in the history
* Add Make target for Ginkgo installation

* Use Ginkgo target for testing

* Fix typos in Make command
  • Loading branch information
agrski authored Nov 2, 2021
1 parent 1f7880d commit c39ed39
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ lint: licenses/dep.txt
./licenses

# Run tests
test: generate fmt vet manifests_all generate-resources
ginkgo -r -outputdir=. -cover -coverprofile=cover.out ./controllers ./utils ./apis
test: install-ginkgo generate fmt vet manifests_all generate-resources
ACK_GINKGO_RC=true \
ACK_GINKGO_DEPRECATIONS=1.16.4 \
$(GINKGO) -r -outputdir=. -cover -coverprofile=cover.out ./controllers ./utils ./apis

# Build manager binary
manager: generate fmt vet
Expand Down Expand Up @@ -187,6 +189,16 @@ else
CONTROLLER_GEN=$(shell which controller-gen)
endif

.PHONY: install-ginkgo
install-ginkgo:
ifeq (, $(shell command -v ginkgo))
go install github.com/onsi/ginkgo/[email protected]

GINKGO=$(GOBIN)/ginkgo
else
GINKGO=$(shell type -p ginkgo)
endif

WEBHOOK_DIR=/tmp/k8s-webhook-server/serving-certs

tls-extract:
Expand Down

0 comments on commit c39ed39

Please sign in to comment.