@@ -30,10 +30,14 @@ GINKGO := $(GO) run github.com/onsi/ginkgo/ginkgo
30
30
BINDATA := $(GO ) run github.com/go-bindata/go-bindata/v3/go-bindata
31
31
GIT_COMMIT := $(shell git rev-parse HEAD)
32
32
33
+ # Phony prerequisite for targets that rely on the go build cache to determine staleness.
33
34
.PHONY : build test run clean vendor schema-check \
34
35
vendor-update coverage coverage-html e2e \
35
36
kubebuilder .FORCE
36
37
38
+ .PHONY : FORCE
39
+ FORCE :
40
+
37
41
all : test build
38
42
39
43
test : clean cover.out
@@ -119,29 +123,23 @@ setup-bare: clean e2e.namespace
119
123
. ./scripts/package_release.sh 1.0.0 test/e2e/resources test/e2e/e2e-bare-values.yaml
120
124
. ./scripts/install_bare.sh $(shell cat ./e2e.namespace) test/e2e/resources
121
125
122
- GINKGO_OPTS := -flakeAttempts 3 -randomizeAllSpecs -v --timeout 120m
126
+ E2E_NODES ?= 1
127
+ E2E_FLAKE_ATTEMPTS ?= 1
128
+ E2E_TIMEOUT ?= 90m
129
+ E2E_OPTS ?= $(if $(E2E_SEED ) ,-seed '$(E2E_SEED ) ') $(if $(TEST ) ,-focus '$(TEST ) ') -flakeAttempts $(E2E_FLAKE_ATTEMPTS ) -nodes $(E2E_NODES ) -timeout $(E2E_TIMEOUT ) -randomizeAllSpecs -v
130
+ E2E_INSTALL_NS ?= operator-lifecycle-manager
131
+ E2E_TEST_NS ?= operators
123
132
124
- # TODO(tflannag): Remove this target entirely and move downstream
125
133
e2e :
126
- $(GINKGO ) \
127
- ./test/e2e \
128
- $(GINKGO_OPTS) \
129
- $< -- \
130
- -namespace =openshift-operators \
131
- -kubeconfig=${KUBECONFIG} \
132
- -olmNamespace=openshift-operator-lifecycle-manager \
133
- -dummyImage=bitnami/nginx:latest
134
+ $(GINKGO ) $(E2E_OPTS ) $(or $(run ) , ./test/e2e) $< -- -namespace=$(E2E_TEST_NS ) -olmNamespace=$(E2E_INSTALL_NS ) -dummyImage=bitnami/nginx:latest $(or $(extra_args ) , -kubeconfig=${KUBECONFIG})
134
135
135
- # ## Start: End To End Tests ###
136
136
137
- # Phony prerequisite for targets that rely on the go build cache to determine staleness.
138
- .PHONY : FORCE
139
- FORCE :
140
-
141
- # main entry point for running end to end tests. used by .github/workflows/e2e-tests.yml See test/e2e/README.md for details
137
+ # See workflows/e2e-tests.yml See test/e2e/README.md for details.
142
138
.PHONY : e2e-local
139
+ e2e-local : extra_args=-kind.images=../test/e2e-local.image.tar
140
+ e2e-local : run=bin/e2e-local.test
143
141
e2e-local : bin/e2e-local.test test/e2e-local.image.tar
144
- $( 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
142
+ e2e-local : e2e
145
143
146
144
# this target updates the zz_chart.go file with files found in deploy/chart
147
145
# this will always fire since it has been marked as phony
@@ -161,8 +159,6 @@ test/e2e-local.image.tar: e2e.Dockerfile bin/wait bin/cpb $(CMDS)
161
159
docker build -t quay.io/operator-framework/olm:local -f $< bin
162
160
docker save -o $@ quay.io/operator-framework/olm:local
163
161
164
- # ## Finish: End To End Tests ###
165
-
166
162
e2e-bare : setup-bare
167
163
. ./scripts/run_e2e_bare.sh $(TEST )
168
164
0 commit comments