Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/source-embe…
Browse files Browse the repository at this point in the history
…dded-hacks
  • Loading branch information
cardil committed Nov 3, 2022
2 parents a98cace + 62b15bd commit cb0b65c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
6 changes: 1 addition & 5 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ aliases:
- akashrv
- lberk
eventing-wg-leads:
- lionelvillard
- pierDipi
eventing-writers:
- akashrv
- aliok
- lberk
- lionelvillard
- matzew
- odacremolbap
- pierDipi
Expand Down Expand Up @@ -108,11 +106,9 @@ aliases:
- tcnghia
- vagababov
- yanweiguo
networking-wg-leads:
- nak3
networking-wg-leads: []
networking-writers:
- JRBANCEL
- nak3
- vagababov
operations-reviewers:
- Cynocracy
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ This is a helper script for Knative E2E test scripts. To use it:
1. By default `knative_teardown()` and `test_teardown()` will be called after
the tests finish, use `--skip-teardowns` if you don't want them to be called.

1. By default Istio is installed on the cluster via Addon, use
`--skip-istio-addon` if you choose not to have it preinstalled.

1. By default Google Kubernetes Engine telemetry to Cloud Logging and Monitoring is disabled.
This can be enabled by setting `ENABLE_GKE_TELEMETRY` to `true`.

Expand Down
15 changes: 3 additions & 12 deletions e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function setup_test_cluster() {

header "Setting up test cluster"
kubectl get nodes

# Set the actual project the test cluster resides in
# It will be a project assigned by Boskos if test is running on Prow,
# otherwise will be ${E2E_GCP_PROJECT_ID} set up by user.
Expand Down Expand Up @@ -90,18 +91,13 @@ function setup_test_cluster() {
echo "- Cluster is ${k8s_cluster}"
echo "- Docker is ${KO_DOCKER_REPO}"

export KO_DATA_PATH="${REPO_ROOT_DIR}/.git"

# Do not run teardowns if we explicitly want to skip them.
(( ! SKIP_TEARDOWNS )) && add_trap teardown_test_resources EXIT

# Handle failures ourselves, so we can dump useful info.
set +o errexit
set +o pipefail

# Wait for Istio installation to complete, if necessary, before calling knative_setup.
# TODO(chizhg): is it really needed?
(( ! SKIP_ISTIO_ADDON )) && (wait_until_batch_job_complete istio-system || return 1)
if function_exists knative_setup; then
knative_setup || fail_test "Knative setup failed"
fi
Expand Down Expand Up @@ -131,7 +127,6 @@ function fail_test() {
}

SKIP_TEARDOWNS=0
SKIP_ISTIO_ADDON=0
E2E_SCRIPT=""
CLOUD_PROVIDER="gke"

Expand Down Expand Up @@ -171,8 +166,8 @@ function initialize() {
case ${parameter} in
--run-tests) run_tests=1 ;;
--skip-teardowns) SKIP_TEARDOWNS=1 ;;
# TODO(chizhg): remove this flag once the addons is defined as an env var.
--skip-istio-addon) SKIP_ISTIO_ADDON=1 ;;
--skip-istio-addon) echo "--skip-istio-addon is no longer supported"
;; # This flag is a noop
*)
case ${parameter} in
--cloud-provider) shift; CLOUD_PROVIDER="$1" ;;
Expand All @@ -185,11 +180,7 @@ function initialize() {
(( IS_PROW )) && [[ -z "${GCP_PROJECT_ID:-}" ]] && IS_BOSKOS=1

if [[ "${CLOUD_PROVIDER}" == "gke" ]]; then
if (( SKIP_ISTIO_ADDON )); then
custom_flags+=("--addons=NodeLocalDNS")
else
custom_flags+=("--addons=Istio,NodeLocalDNS")
fi
fi

readonly IS_BOSKOS
Expand Down
2 changes: 1 addition & 1 deletion test/unit/presubmit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestMainFunc(t *testing.T) {
"--enable-workload-identity --cluster-version=latest "+
"--extra-gcloud-flags --enable-stackdriver-kubernetes "+
"--no-enable-ip-alias --no-enable-autoupgrade "+
"--addons=Istio,NodeLocalDNS "+
"--addons=NodeLocalDNS "+
"--test-command=%s/test/e2e-tests.sh "+
"--run-tests --extra-gcloud-flags= --logging=NONE "+
"--monitoring=NONE", rootDir)),
Expand Down
1 change: 0 additions & 1 deletion test/unit/run_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ func TestRunE2eTests(t *testing.T) {
stdout: []check{
contains("SETTING UP TEST CLUSTER"),
contains("Cluster is gke_deadbeef_1.24"),
contains("kubectl wait job --for=condition=Complete --all -n istio-system --timeout=5m"),
contains("STARTING KNATIVE SERVING"),
contains("Waiting until all pods in namespace knative-serving are up"),
contains("E2E TESTS PASSED"),
Expand Down

0 comments on commit cb0b65c

Please sign in to comment.