-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert tests to plain go tests (#122)
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
- Loading branch information
1 parent
ff9afe0
commit 0e20605
Showing
34 changed files
with
1,731 additions
and
1,815 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,19 +34,19 @@ endif | |
# by default, do not run the manager with webhooks enabled. This only affects local runs, not the build or in-cluster deployments. | ||
ENABLE_WEBHOOKS ?= false | ||
|
||
# If we are running in CI, run ginkgo with the recommended CI settings | ||
# If we are running in CI, run go test in verbose mode | ||
ifeq (,$(CI)) | ||
GINKGO_OPTS=-r | ||
GOTEST_OPTS=-race | ||
else | ||
GINKGO_OPTS=-r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --progress --compilers=2 -v | ||
GOTEST_OPTS=-race -v | ||
endif | ||
|
||
all: manager | ||
ci: test | ||
|
||
# Run tests | ||
test: ginkgo generate fmt vet manifests | ||
$(GINKGO) $(GINKGO_OPTS) | ||
test: generate fmt vet manifests | ||
go test ${GOTEST_OPTS} ./... | ||
|
||
# Build manager binary | ||
manager: generate fmt vet | ||
|
@@ -125,19 +125,6 @@ else | |
CONTROLLER_GEN=$(shell which controller-gen) | ||
endif | ||
|
||
# find or download ginkgo | ||
# download ginkgo if necessary | ||
ginkgo: | ||
ifeq (, $(shell which ginkgo)) | ||
@{ \ | ||
set -e ;\ | ||
go get github.com/onsi/ginkgo/[email protected] ;\ | ||
} | ||
GINKGO=$(GOBIN)/ginkgo | ||
else | ||
GINKGO=$(shell which ginkgo) | ||
endif | ||
|
||
kustomize: | ||
ifeq (, $(shell which kustomize)) | ||
@{ \ | ||
|
Oops, something went wrong.