Skip to content

Commit

Permalink
Convert tests to plain go tests (#122)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Nov 16, 2020
1 parent ff9afe0 commit 0e20605
Show file tree
Hide file tree
Showing 34 changed files with 1,731 additions and 1,815 deletions.
23 changes: 5 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
@{ \
Expand Down
Loading

0 comments on commit 0e20605

Please sign in to comment.