Skip to content

Commit

Permalink
Do not override global RUN_E2E_SKIP in e2e script (#3173)
Browse files Browse the repository at this point in the history
Otherwise running the script with `--e2e-all` would not run any
NetworkPolicy tests.

Signed-off-by: Quan Tian <qtian@vmware.com>
  • Loading branch information
tnqn authored Jan 6, 2022
1 parent e120965 commit 0be629b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ci/run-k8s-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,29 +188,33 @@ function run_sonobuoy() {
}

function run_conformance() {
local e2e_skip="${DEFAULT_E2E_CONFORMANCE_SKIP}"

if [[ "$RUN_E2E_FOCUS" != "" ]]; then
echo "It is not allowed to specify focus when running conformance tests"
exit 1
fi
if [[ "$RUN_E2E_SKIP" == "" ]]; then
RUN_E2E_SKIP="${DEFAULT_E2E_CONFORMANCE_SKIP}"
if [[ "$RUN_E2E_SKIP" != "" ]]; then
e2e_skip="$RUN_E2E_SKIP"
fi
run_sonobuoy "${DEFAULT_E2E_CONFORMANCE_FOCUS}" "${RUN_E2E_SKIP}"
run_sonobuoy "${DEFAULT_E2E_CONFORMANCE_FOCUS}" "${e2e_skip}"
}

function run_whole_conformance() {
run_sonobuoy "" ""
}

function run_network_policy() {
local e2e_skip="${DEFAULT_E2E_NETWORKPOLICY_SKIP}"

if [[ "$RUN_E2E_FOCUS" != "" ]]; then
echo "It is not allowed to specify focus when running network policy tests"
exit 1
fi
if [[ "$RUN_E2E_SKIP" == "" ]]; then
RUN_E2E_SKIP="${DEFAULT_E2E_NETWORKPOLICY_SKIP}"
if [[ "$RUN_E2E_SKIP" != "" ]]; then
e2e_skip="$RUN_E2E_SKIP"
fi
run_sonobuoy "${DEFAULT_E2E_NETWORKPOLICY_FOCUS}" "${RUN_E2E_SKIP}"
run_sonobuoy "${DEFAULT_E2E_NETWORKPOLICY_FOCUS}" "${e2e_skip}"
}

if [[ "$RUN_E2E_FOCUS" != "" ]]; then
Expand Down

0 comments on commit 0be629b

Please sign in to comment.