Skip to content

Commit

Permalink
Fix e2e script to disable cors policy for Contour tests (#15235)
Browse files Browse the repository at this point in the history
* fix command to disable cors policy for Contour tests

* increase test timeout
  • Loading branch information
izabelacg authored May 23, 2024
1 parent e89957c commit 7aa7ed8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ kubectl replace cm "config-gc" -n ${SYSTEM_NAMESPACE} -f "${TMP_DIR}"/config-gc.
# Run tests with CORS policy enabled for Contour
if [[ "${INGRESS_CLASS}" == *"contour"* ]]; then
toggle_feature cors-policy "allowOrigin:\n - '*'\nallowMethods:\n - GET\n - OPTIONS\n" config-contour || fail_test
go_test_e2e -timeout=2m ./test/e2e/corspolicy ${E2E_TEST_FLAGS} || failed=1
toggle_feature cors-policy "" config-contour || fail_test
go_test_e2e -timeout=5m ./test/e2e/corspolicy ${E2E_TEST_FLAGS} || failed=1
kubectl patch cm config-contour -n "${SYSTEM_NAMESPACE}" --type=json -p '[{"op": "remove", "path": "/data/cors-policy"}]' || fail_test
echo "Waiting 30s for change to get picked up."
sleep 30
fi

# Run scale tests.
Expand Down

0 comments on commit 7aa7ed8

Please sign in to comment.