Skip to content

Commit

Permalink
Makefile: Update the e2e target to use ginkgo
Browse files Browse the repository at this point in the history
Update the root Makefile and update the `e2e` target to use the ginkgo
executable instead of `go test ...` as logs produce when running the e2e
suite aren't captured until after the process has completed. This leads
to situations where failing tests aren't immediately communicated back
and loss of logs entirely in the case where the process was manually
teminated.

Signed-off-by: timflannagan <timflannagan@gmail.com>
  • Loading branch information
timflannagan committed Sep 21, 2021
1 parent e48737c commit ea5af1c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,18 @@ setup-bare: clean e2e.namespace
. ./scripts/package_release.sh 1.0.0 test/e2e/resources test/e2e/e2e-bare-values.yaml
. ./scripts/install_bare.sh $(shell cat ./e2e.namespace) test/e2e/resources

# e2e test exculding the rh-operators directory which tests rh-operators and their metric cardinality.
GINKGO_OPTS := -flakeAttempts 3 -randomizeAllSpecs -v --timeout 120m

# TODO(tflannag): Remove this target entirely and move downstream
e2e:
go test -v $(MOD_FLAGS) -failfast -timeout 150m ./test/e2e/... -namespace=openshift-operators -kubeconfig=${KUBECONFIG} -olmNamespace=openshift-operator-lifecycle-manager -dummyImage=bitnami/nginx:latest -ginkgo.flakeAttempts=3
$(GINKGO) \
./test/e2e \
$(GINKGO_OPTS) \
$< -- \
-namespace=openshift-operators \
-kubeconfig=${KUBECONFIG} \
-olmNamespace=openshift-operator-lifecycle-manager \
-dummyImage=bitnami/nginx:latest

### Start: End To End Tests ###

Expand All @@ -132,7 +141,7 @@ FORCE:
# main entry point for running end to end tests. used by .github/workflows/e2e-tests.yml See test/e2e/README.md for details
.PHONY: e2e-local
e2e-local: bin/e2e-local.test test/e2e-local.image.tar
$(GINKGO) -nodes $(or $(NODES),1) -flakeAttempts 3 -randomizeAllSpecs $(if $(TEST),-focus '$(TEST)') -v -timeout 90m $< -- -namespace=operators -olmNamespace=operator-lifecycle-manager -dummyImage=bitnami/nginx:latest -kind.images=../test/e2e-local.image.tar
$(GINKGO) -nodes $(or $(NODES),1) -flakeAttempts 1 -randomizeAllSpecs $(if $(TEST),-focus '$(TEST)') -v -timeout 90m $< -- -namespace=operators -olmNamespace=operator-lifecycle-manager -dummyImage=bitnami/nginx:latest -kind.images=../test/e2e-local.image.tar

# this target updates the zz_chart.go file with files found in deploy/chart
# this will always fire since it has been marked as phony
Expand Down

0 comments on commit ea5af1c

Please sign in to comment.