Skip to content

Commit

Permalink
Change the way we run e2e tests with feature gates in pipelines
Browse files Browse the repository at this point in the history
Prior to this commit pipelines ran e2e tests for both "stable" and
"alpha" feature gates in a single prow job. This makes the tests
take twice as long as running running either individually.

In a parallel commit to Plumbing we are introducing a new prow job
that is specifically for running alpha e2e tests. This means both
the alpha and stable tests can be run concurrently and hopefully
should reduce the iteration time on PRs - failures should show up
sooner.

The alpha feature gate prow job will set the PIPELINE_FEATURE_GATE
env var when it is initiated. Our e2e script recognizes this var
and sets the feature-flags configmap accordingly. If the env var
is not set then we default to running under "stable" feature gate.
  • Loading branch information
Scott committed May 10, 2021
1 parent b86a9a2 commit 3b29316
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ function run_e2e() {
go_test_e2e -tags=examples -timeout=20m ./test/ || failed=1
}

set_feature_gate "stable"
run_e2e
if [ "$PIPELINE_FEATURE_GATE" == "" ]; then
set_feature_gate "stable"
run_e2e
else
set_feature_gate "$PIPELINE_FEATURE_GATE"
run_e2e
fi

set_feature_gate "alpha"
run_e2e

(( failed )) && fail_test
success

0 comments on commit 3b29316

Please sign in to comment.