@@ -67,106 +67,109 @@ if (( SHORT )); then
6767 GO_TEST_FLAGS+=(" -short" )
6868fi
6969
70- go_test_e2e -timeout=50m \
71- " ${GO_TEST_FLAGS[@]} " \
72- ./test/conformance/api/... \
73- ./test/conformance/runtime/... \
74- ./test/e2e \
75- " ${E2E_TEST_FLAGS[@]} " || failed=1
76-
77- toggle_feature tag-header-based-routing Enabled
78- go_test_e2e -timeout=2m ./test/e2e/tagheader " ${E2E_TEST_FLAGS[@]} " || failed=1
79- toggle_feature tag-header-based-routing Disabled
80-
81- toggle_feature allow-zero-initial-scale true config-autoscaler || fail_test
82- go_test_e2e -timeout=2m ./test/e2e/initscale " ${E2E_TEST_FLAGS[@]} " || failed=1
83- toggle_feature allow-zero-initial-scale false config-autoscaler || fail_test
84-
85- go_test_e2e -timeout=2m ./test/e2e/domainmapping " ${E2E_TEST_FLAGS[@]} " || failed=1
86-
87- toggle_feature cluster-local-domain-tls enabled config-network || fail_test
88- go_test_e2e -timeout=2m ./test/e2e/clusterlocaldomaintls " ${E2E_TEST_FLAGS[@]} " || failed=1
89- toggle_feature cluster-local-domain-tls disabled config-network || fail_test
90-
91- toggle_feature system-internal-tls enabled config-network || fail_test
92- toggle_feature " logging.enable-request-log" true config-observability || fail_test
93- toggle_feature " logging.request-log-template" " TLS: {{.Request.TLS}}" config-observability || fail_test
94- # with current implementation, Activator must be restarted when configuring system-internal-tls. See https://github.com/knative/serving/issues/13754
95- restart_pod " ${SYSTEM_NAMESPACE} " " app=activator"
96-
97- # we need to restart the pod in order to start the net-certmanager-controller
98- if (( ! HTTPS )) ; then
99- restart_pod " ${SYSTEM_NAMESPACE} " " app=controller"
100- fi
101- go_test_e2e -timeout=3m ./test/e2e/systeminternaltls " ${E2E_TEST_FLAGS[@]} " || failed=1
102- toggle_feature system-internal-tls disabled config-network || fail_test
103- toggle_feature " logging.enable-request-log" false config-observability || fail_test
104- toggle_feature " logging.request-log-template" ' ' config-observability || fail_test
105- # with the current implementation, Activator is always in the request path, and needs to be restarted after configuring system-internal-tls
106- restart_pod " ${SYSTEM_NAMESPACE} " " app=activator"
107-
108- # we need to restart the pod to stop the net-certmanager-controller
109- if (( ! HTTPS )) ; then
110- restart_pod " ${SYSTEM_NAMESPACE} " " app=controller"
111- kubectl get leases -n " ${SYSTEM_NAMESPACE} " -o json | jq -r ' .items[] | select(.metadata.name | test("controller.knative.dev.serving.pkg.reconciler.certificate.reconciler")).metadata.name' | xargs kubectl delete lease -n " ${SYSTEM_NAMESPACE} "
112- fi
113-
114- kubectl get cm " config-gc" -n " ${SYSTEM_NAMESPACE} " -o yaml > " ${TMP_DIR} " /config-gc.yaml
115- add_trap " kubectl replace cm 'config-gc' -n ${SYSTEM_NAMESPACE} -f ${TMP_DIR} /config-gc.yaml" SIGKILL SIGTERM SIGQUIT
116- immediate_gc
117- go_test_e2e -timeout=2m ./test/e2e/gc " ${E2E_TEST_FLAGS[@]} " || failed=1
118- kubectl replace cm " config-gc" -n " ${SYSTEM_NAMESPACE} " -f " ${TMP_DIR} " /config-gc.yaml
119-
120- # Run scale tests.
121- # Note that we use a very high -parallel because each ksvc is run as its own
122- # sub-test. If this is not larger than the maximum scale tested then the test
123- # simply cannot pass.
124- # TODO - Renable once we get this reliably passing on GKE 1.21
125- # go_test_e2e -timeout=20m -parallel=300 ./test/scale "${E2E_TEST_FLAGS[@]}" || failed=1
126-
127- # Run HPA tests
128- go_test_e2e -timeout=30m -tags=hpa ./test/e2e " ${E2E_TEST_FLAGS[@]} " || failed=1
129-
130- # Run initContainers tests with alpha enabled avoiding any issues with the testing options guard above
131- # InitContainers test uses emptyDir.
132- toggle_feature kubernetes.podspec-init-containers Enabled
133- go_test_e2e -timeout=2m ./test/e2e/initcontainers " ${E2E_TEST_FLAGS[@]} " || failed=1
134- toggle_feature kubernetes.podspec-init-containers Disabled
135-
136- # Run multi-container probe tests
137- toggle_feature multi-container-probing Enabled
138- go_test_e2e -timeout=2m ./test/e2e/multicontainerprobing " ${E2E_TEST_FLAGS[@]} " || failed=1
139- toggle_feature multi-container-probing Disabled
140-
141- # RUN PVC tests with default storage class.
142- toggle_feature kubernetes.podspec-persistent-volume-claim Enabled
143- toggle_feature kubernetes.podspec-persistent-volume-write Enabled
144- toggle_feature kubernetes.podspec-securitycontext Enabled
145- go_test_e2e -timeout=5m ./test/e2e/pvc " ${E2E_TEST_FLAGS[@]} " || failed=1
146- toggle_feature kubernetes.podspec-securitycontext Disabled
147- toggle_feature kubernetes.podspec-persistent-volume-write Disabled
148- toggle_feature kubernetes.podspec-persistent-volume-claim Disabled
149-
150- # RUN secure pod defaults test in a separate install.
151- toggle_feature secure-pod-defaults Enabled
152- go_test_e2e -timeout=3m ./test/e2e/securedefaults " ${E2E_TEST_FLAGS[@]} " || failed=1
153- toggle_feature secure-pod-defaults Disabled
154-
155- # Run HA tests separately as they're stopping core Knative Serving pods.
156- # Define short -spoofinterval to ensure frequent probing while stopping pods.
157- go_test_e2e -timeout=30m -failfast -parallel=1 ./test/ha \
158- " ${E2E_TEST_FLAGS[@]} " \
159- -replicas=" ${REPLICAS:- 1} " \
160- -buckets=" ${BUCKETS:- 1} " \
161- -spoofinterval=" 10ms" || failed=1
162-
163- if (( HTTPS )) ; then
164- kubectl delete -f " ${E2E_YAML_DIR} " /test/config/externaldomaintls/certmanager/caissuer/ --ignore-not-found
165- toggle_feature external-domain-tls Disabled config-network
166- # we need to restart the pod to stop the net-certmanager-controller
167- restart_pod " ${SYSTEM_NAMESPACE} " " app=controller"
168- kubectl get leases -n " ${SYSTEM_NAMESPACE} " -o json | jq -r ' .items[] | select(.metadata.name | test("controller.knative.dev.serving.pkg.reconciler.certificate.reconciler")).metadata.name' | xargs kubectl delete lease -n " ${SYSTEM_NAMESPACE} "
169- fi
70+ # go_test_e2e -timeout=50m \
71+ # "${GO_TEST_FLAGS[@]}" \
72+ # ./test/conformance/api/... \
73+ # ./test/conformance/runtime/... \
74+ # ./test/e2e \
75+ # "${E2E_TEST_FLAGS[@]}" || failed=1
76+ #
77+ # toggle_feature tag-header-based-routing Enabled
78+ # go_test_e2e -timeout=2m ./test/e2e/tagheader "${E2E_TEST_FLAGS[@]}" || failed=1
79+ # toggle_feature tag-header-based-routing Disabled
80+
81+ for i in {1..20}; do
82+ export TEST_RUN=$i
83+ toggle_feature allow-zero-initial-scale true config-autoscaler || fail_test
84+ go_test_e2e -timeout=2m ./test/e2e/initscale " ${E2E_TEST_FLAGS[@]} " || failed=1
85+ toggle_feature allow-zero-initial-scale false config-autoscaler || fail_test
86+ done
87+
88+ # go_test_e2e -timeout=2m ./test/e2e/domainmapping "${E2E_TEST_FLAGS[@]}" || failed=1
89+ #
90+ # toggle_feature cluster-local-domain-tls enabled config-network || fail_test
91+ # go_test_e2e -timeout=2m ./test/e2e/clusterlocaldomaintls "${E2E_TEST_FLAGS[@]}" || failed=1
92+ # toggle_feature cluster-local-domain-tls disabled config-network || fail_test
93+ #
94+ # toggle_feature system-internal-tls enabled config-network || fail_test
95+ # toggle_feature "logging.enable-request-log" true config-observability || fail_test
96+ # toggle_feature "logging.request-log-template" "TLS: {{.Request.TLS}}" config-observability || fail_test
97+ # # with current implementation, Activator must be restarted when configuring system-internal-tls. See https://github.com/knative/serving/issues/13754
98+ # restart_pod "${SYSTEM_NAMESPACE}" "app=activator"
99+ #
100+ # # we need to restart the pod in order to start the net-certmanager-controller
101+ # if (( ! HTTPS )); then
102+ # restart_pod "${SYSTEM_NAMESPACE}" "app=controller"
103+ # fi
104+ # go_test_e2e -timeout=3m ./test/e2e/systeminternaltls "${E2E_TEST_FLAGS[@]}" || failed=1
105+ # toggle_feature system-internal-tls disabled config-network || fail_test
106+ # toggle_feature "logging.enable-request-log" false config-observability || fail_test
107+ # toggle_feature "logging.request-log-template" '' config-observability || fail_test
108+ # # with the current implementation, Activator is always in the request path, and needs to be restarted after configuring system-internal-tls
109+ # restart_pod "${SYSTEM_NAMESPACE}" "app=activator"
110+ #
111+ # # we need to restart the pod to stop the net-certmanager-controller
112+ # if (( ! HTTPS )); then
113+ # restart_pod "${SYSTEM_NAMESPACE}" "app=controller"
114+ # kubectl get leases -n "${SYSTEM_NAMESPACE}" -o json | jq -r '.items[] | select(.metadata.name | test("controller.knative.dev.serving.pkg.reconciler.certificate.reconciler")).metadata.name' | xargs kubectl delete lease -n "${SYSTEM_NAMESPACE}"
115+ # fi
116+ #
117+ # kubectl get cm "config-gc" -n "${SYSTEM_NAMESPACE}" -o yaml > "${TMP_DIR}"/config-gc.yaml
118+ # add_trap "kubectl replace cm 'config-gc' -n ${SYSTEM_NAMESPACE} -f ${TMP_DIR}/config-gc.yaml" SIGKILL SIGTERM SIGQUIT
119+ # immediate_gc
120+ # go_test_e2e -timeout=2m ./test/e2e/gc "${E2E_TEST_FLAGS[@]}" || failed=1
121+ # kubectl replace cm "config-gc" -n "${SYSTEM_NAMESPACE}" -f "${TMP_DIR}"/config-gc.yaml
122+ #
123+ # # Run scale tests.
124+ # # Note that we use a very high -parallel because each ksvc is run as its own
125+ # # sub-test. If this is not larger than the maximum scale tested then the test
126+ # # simply cannot pass.
127+ # # TODO - Renable once we get this reliably passing on GKE 1.21
128+ # # go_test_e2e -timeout=20m -parallel=300 ./test/scale "${E2E_TEST_FLAGS[@]}" || failed=1
129+ #
130+ # # Run HPA tests
131+ # go_test_e2e -timeout=30m -tags=hpa ./test/e2e "${E2E_TEST_FLAGS[@]}" || failed=1
132+ #
133+ # # Run initContainers tests with alpha enabled avoiding any issues with the testing options guard above
134+ # # InitContainers test uses emptyDir.
135+ # toggle_feature kubernetes.podspec-init-containers Enabled
136+ # go_test_e2e -timeout=2m ./test/e2e/initcontainers "${E2E_TEST_FLAGS[@]}" || failed=1
137+ # toggle_feature kubernetes.podspec-init-containers Disabled
138+ #
139+ # # Run multi-container probe tests
140+ # toggle_feature multi-container-probing Enabled
141+ # go_test_e2e -timeout=2m ./test/e2e/multicontainerprobing "${E2E_TEST_FLAGS[@]}" || failed=1
142+ # toggle_feature multi-container-probing Disabled
143+ #
144+ # # RUN PVC tests with default storage class.
145+ # toggle_feature kubernetes.podspec-persistent-volume-claim Enabled
146+ # toggle_feature kubernetes.podspec-persistent-volume-write Enabled
147+ # toggle_feature kubernetes.podspec-securitycontext Enabled
148+ # go_test_e2e -timeout=5m ./test/e2e/pvc "${E2E_TEST_FLAGS[@]}" || failed=1
149+ # toggle_feature kubernetes.podspec-securitycontext Disabled
150+ # toggle_feature kubernetes.podspec-persistent-volume-write Disabled
151+ # toggle_feature kubernetes.podspec-persistent-volume-claim Disabled
152+ #
153+ # # RUN secure pod defaults test in a separate install.
154+ # toggle_feature secure-pod-defaults Enabled
155+ # go_test_e2e -timeout=3m ./test/e2e/securedefaults "${E2E_TEST_FLAGS[@]}" || failed=1
156+ # toggle_feature secure-pod-defaults Disabled
157+ #
158+ # # Run HA tests separately as they're stopping core Knative Serving pods.
159+ # # Define short -spoofinterval to ensure frequent probing while stopping pods.
160+ # go_test_e2e -timeout=30m -failfast -parallel=1 ./test/ha \
161+ # "${E2E_TEST_FLAGS[@]}" \
162+ # -replicas="${REPLICAS:-1}" \
163+ # -buckets="${BUCKETS:-1}" \
164+ # -spoofinterval="10ms" || failed=1
165+ #
166+ # if (( HTTPS )); then
167+ # kubectl delete -f "${E2E_YAML_DIR}"/test/config/externaldomaintls/certmanager/caissuer/ --ignore-not-found
168+ # toggle_feature external-domain-tls Disabled config-network
169+ # # we need to restart the pod to stop the net-certmanager-controller
170+ # restart_pod "${SYSTEM_NAMESPACE}" "app=controller"
171+ # kubectl get leases -n "${SYSTEM_NAMESPACE}" -o json | jq -r '.items[] | select(.metadata.name | test("controller.knative.dev.serving.pkg.reconciler.certificate.reconciler")).metadata.name' | xargs kubectl delete lease -n "${SYSTEM_NAMESPACE}"
172+ # fi
170173
171174(( failed )) && fail_test
172175
0 commit comments