Skip to content

Commit 1ad66f3

Browse files
committed
Make e2e tests skip all featuregate tests
However, if `TEST_WITH_FEATURE_GATES_ENABLED=true` is set, then all feature gates are enabled and their tests will be run
1 parent 06db22e commit 1ad66f3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

vertical-pod-autoscaler/hack/run-e2e-locally.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ echo " loading image into kind"
8787
kind load docker-image localhost:5001/write-metrics:dev
8888

8989

90+
export FEATURE_GATES=""
91+
export TEST_WITH_FEATURE_GATES_ENABLED=""
92+
93+
if [ "${ENABLE_ALL_FEATURE_GATES:-}" == "yes" ] ; then
94+
export FEATURE_GATES='AllAlpha=true,AllBeta=true'
95+
export TEST_WITH_FEATURE_GATES_ENABLED="true"
96+
fi
97+
9098
case ${SUITE} in
9199
recommender|recommender-externalmetrics|updater|admission-controller|actuation|full-vpa)
92100
${SCRIPT_ROOT}/hack/vpa-down.sh

vertical-pod-autoscaler/hack/run-e2e-tests.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ export GO111MODULE=on
4646

4747
export WORKSPACE=${WORKSPACE:-/workspace/_artifacts}
4848

49+
SKIP="--ginkgo.skip=\[Feature\:OffByDefault\]"
50+
51+
if [ "${TEST_WITH_FEATURE_GATES_ENABLED:-}" == "true" ]; then
52+
SKIP=""
53+
fi
54+
4955
case ${SUITE} in
5056
recommender|updater|admission-controller|actuation|full-vpa)
5157
export KUBECONFIG=$HOME/.kube/config
5258
pushd ${SCRIPT_ROOT}/e2e
53-
go test ./v1/*go -v --test.timeout=150m --args --ginkgo.v=true --ginkgo.focus="\[VPA\] \[${SUITE}\]" --report-dir=${WORKSPACE} --disable-log-dump --ginkgo.timeout=150m
59+
go test ./v1/*go -v --test.timeout=150m --args --ginkgo.v=true --ginkgo.focus="\[VPA\] \[${SUITE}\]" --report-dir=${WORKSPACE} --disable-log-dump --ginkgo.timeout=150m ${SKIP}
5460
V1_RESULT=$?
5561
popd
5662
echo v1 test result: ${V1_RESULT}

0 commit comments

Comments
 (0)