Skip to content

Commit 46c204b

Browse files
author
Per Goncalves da Silva
committed
parameterize e2e target
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent f9485ff commit 46c204b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/e2e-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464

6565
# set e2e environment variables
6666
# Set ginkgo output and parallelism
67-
- run: echo "GINKGO_E2E_OPTS=-output-dir ${ARTIFACT_DIR} -junit-report junit_e2e.xml -nodes ${E2E_NODES}" >> $GITHUB_ENV
67+
- run: echo "GINKGO_OPTS=-output-dir ${ARTIFACT_DIR} -junit-report junit_e2e.xml -nodes ${E2E_NODES}" >> $GITHUB_ENV
6868

6969
# Setting -kubeconfig-root tells the e2e test suite to look for kubeconfigs
7070
# in <kubeconfig-root>/kubeconfig-<node-number>
@@ -98,15 +98,15 @@ jobs:
9898
# focus on those tests and skip tests marked as FLAKE
9999
run: |
100100
E2E_TEST_NUM_CHUNKS=$(( ${{ strategy.job-total }} - 1 )) \
101-
GINKGO_E2E_OPTS="${GINKGO_E2E_OPTS} -focus '$(go run ./test/e2e/split/... -chunks $E2E_TEST_NUM_CHUNKS -print-chunk $E2E_TEST_CHUNK ./test/e2e)' -skip '\[FLAKE\]'" \
101+
GINKGO_OPTS="${GINKGO_OPTS} -focus '$(go run ./test/e2e/split/... -chunks $E2E_TEST_NUM_CHUNKS -print-chunk $E2E_TEST_CHUNK ./test/e2e)' -skip '\[FLAKE\]'" \
102102
make e2e;
103103
104104
# run e2e tests for flakes if matrix-id is 'flakes'
105105
- name: Run flaky e2e tests
106106
if: ${{ matrix.parallel-id == 'flakes' }}
107107
# focus on tests marked as FLAKE
108108
run: |
109-
GINKGO_E2E_OPTS="${GINKGO_E2E_OPTS} -focus '\[FLAKE\]'" make e2e
109+
GINKGO_OPTS="${GINKGO_OPTS} -focus '\[FLAKE\]'" make e2e
110110
111111
# archive test results
112112
- name: Archive Test Artifacts

Makefile

+9-3
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,16 @@ e2e.namespace:
126126
@printf "e2e-tests-$(shell date +%s)-$$RANDOM" > e2e.namespace
127127

128128
.PHONY: e2e
129-
GINKGO_E2E_OPTS += -timeout 90m -v -randomize-suites -race -trace --show-node-events
130-
E2E_OPTS += -namespace=operators -olmNamespace=operator-lifecycle-manager -catalogNamespace=operator-lifecycle-manager -dummyImage=bitnami/nginx:latest
129+
E2E_TIMEOUT ?= 90m
130+
E2E_TEST_NS ?= operators
131+
E2E_INSTALL_NS ?= operator-lifecycle-manager
132+
E2E_CATALOG_NS ?= $(E2E_INSTALL_NS)
133+
GINKGO_OPTS += -v -randomize-suites -race -trace --show-node-events
131134
e2e:
132-
$(GINKGO) $(GINKGO_E2E_OPTS) ./test/e2e -- $(E2E_OPTS)
135+
$(GINKGO) -timeout $(E2E_TIMEOUT) $(GINKGO_OPTS) ./test/e2e -- -namespace=E2E_TEST_NS -olmNamespace=$(E2E_INSTALL_NS) -catalogNamespace=$(E2E_CATALOG_NS) $(E2E_OPTS)
136+
137+
.PHONY: e2e-local
138+
e2e-local: e2e-build kind-create deploy e2e
133139

134140
.PHONY: kind-clean
135141
kind-clean:

0 commit comments

Comments
 (0)