Skip to content

Commit

Permalink
use ginkgo binary for tests
Browse files Browse the repository at this point in the history
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
  • Loading branch information
anandrkskd committed Jun 23, 2022
1 parent ac54230 commit 244649e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .ibm/pipelines/kubernetes-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cleanup_namespaces

(
set -e
make goget-ginkgo
make install
make test-integration-devfile
make test-interactive
Expand Down
1 change: 1 addition & 0 deletions .ibm/pipelines/openshift-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cleanup_namespaces

(
set -e
make goget-ginkgo
make install
make test-integration
make test-interactive
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ else
endif

# Slow spec threshold for ginkgo tests. After this time (in second), ginkgo marks test as slow
SLOW_SPEC_THRESHOLD := 120
SLOW_SPEC_THRESHOLD := 120s

# Env variable GINKGO_TEST_ARGS is used to get control over enabling ginkgo test flags against each test target run.
# For example:
Expand All @@ -45,15 +45,15 @@ export ODO_LOG_LEVEL ?= 4
# To enable verbosity export or set env GINKGO_TEST_ARGS like "GINKGO_TEST_ARGS=-v"
UNIT_TEST_ARGS ?=

GINKGO_FLAGS_ALL = $(GINKGO_TEST_ARGS) -randomizeAllSpecs -slowSpecThreshold=$(SLOW_SPEC_THRESHOLD) -timeout $(TIMEOUT)
GINKGO_FLAGS_ALL = $(GINKGO_TEST_ARGS) --randomize-all --slow-spec-threshold=$(SLOW_SPEC_THRESHOLD) -timeout $(TIMEOUT)

# Flags for tests that must not be run in parallel.
GINKGO_FLAGS_SERIAL = $(GINKGO_FLAGS_ALL) -nodes=1
# Flags for tests that may be run in parallel
GINKGO_FLAGS=$(GINKGO_FLAGS_ALL) -nodes=$(TEST_EXEC_NODES)


RUN_GINKGO = GOFLAGS='-mod=vendor' go run $(COMMON_GOFLAGS) github.com/onsi/ginkgo/ginkgo
RUN_GINKGO = `ginkgo`

default: bin

Expand Down Expand Up @@ -116,8 +116,7 @@ goget-tools:

.PHONY: goget-ginkgo
goget-ginkgo:
@echo "This is no longer used."
@echo "Ginkgo can be executed directly from this repository using command '$(RUN_GINKGO)'"
go install github.com/onsi/ginkgo/v2/ginkgo@latest

.PHONY: test-coverage
test-coverage: ## Run unit tests and collect coverage
Expand Down

0 comments on commit 244649e

Please sign in to comment.