From bf694945f5859f1cc07dd5f8ad0558b82b05b2e7 Mon Sep 17 00:00:00 2001 From: Clay Kauzlaric Date: Thu, 5 Oct 2023 11:00:39 -0400 Subject: [PATCH] use new flag name * we have switched to system-internal-tls --- test/e2e-tests.sh | 8 ++++---- .../README.md | 6 +++--- .../system_internal_tls_test.go} | 13 +------------ 3 files changed, 8 insertions(+), 19 deletions(-) rename test/e2e/{internalencryption => systeminternaltls}/README.md (72%) rename test/e2e/{internalencryption/internalencryption_test.go => systeminternaltls/system_internal_tls_test.go} (94%) diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index 7b67855fc5e0..843e38ce8643 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -81,16 +81,16 @@ toggle_feature allow-zero-initial-scale false config-autoscaler || fail_test go_test_e2e -timeout=2m ./test/e2e/domainmapping ${E2E_TEST_FLAGS} || failed=1 -toggle_feature dataplane-trust enabled config-network || fail_test +toggle_feature system-internal-tls enabled config-network || fail_test toggle_feature "logging.enable-request-log" true config-observability || fail_test toggle_feature "logging.request-log-template" "TLS: {{.Request.TLS}}" config-observability || fail_test # with current implementation, Activator must be restarted when configuring system-internal-tls. See https://github.com/knative/serving/issues/13754 restart_pod ${SYSTEM_NAMESPACE} "app=activator" -go_test_e2e -timeout=2m ./test/e2e/internalencryption ${E2E_TEST_FLAGS} || failed=1 -toggle_feature dataplane-trust disabled config-network || fail_test +go_test_e2e -timeout=2m ./test/e2e/systeminternaltls ${E2E_TEST_FLAGS} || failed=1 +toggle_feature system-internal-tls disabled config-network || fail_test toggle_feature enable-request-log false config-observability || fail_test toggle_feature request-log-template '' config-observability || fail_test -# with the current implementation, Activator is always in the request path, and needs to be restarted after configuring dataplane-trust +# with the current implementation, Activator is always in the request path, and needs to be restarted after configuring system-internal-tls restart_pod ${SYSTEM_NAMESPACE} "app=activator" kubectl get cm "config-gc" -n "${SYSTEM_NAMESPACE}" -o yaml > "${TMP_DIR}"/config-gc.yaml diff --git a/test/e2e/internalencryption/README.md b/test/e2e/systeminternaltls/README.md similarity index 72% rename from test/e2e/internalencryption/README.md rename to test/e2e/systeminternaltls/README.md index f446ab5eaecf..9e09f147f5bf 100644 --- a/test/e2e/internalencryption/README.md +++ b/test/e2e/systeminternaltls/README.md @@ -1,8 +1,8 @@ -# Internal Encryption E2E Tests +# System Internal TLS E2E Tests -In order to test Internal Encryption, this test turns enables request logging and sets the request log template to `TLS: {{.Request.TLS}}`. +In order to test System Internal TLS, this test turns enables request logging and sets the request log template to `TLS: {{.Request.TLS}}`. -The test setup will enable Internal Encryption, and then configure the logging settings. +The test setup will enable System Internal TLS, and then configure the logging settings. The test then deploys and attempts to reach the HelloWorld test image. diff --git a/test/e2e/internalencryption/internalencryption_test.go b/test/e2e/systeminternaltls/system_internal_tls_test.go similarity index 94% rename from test/e2e/internalencryption/internalencryption_test.go rename to test/e2e/systeminternaltls/system_internal_tls_test.go index 510d33dca5b5..a41a685a89d6 100644 --- a/test/e2e/internalencryption/internalencryption_test.go +++ b/test/e2e/systeminternaltls/system_internal_tls_test.go @@ -17,13 +17,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package internalencryption +package systeminternaltls import ( "bufio" "bytes" "context" - "crypto/tls" "fmt" "io" "strings" @@ -32,7 +31,6 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" - netcfg "knative.dev/networking/pkg/config" "knative.dev/pkg/system" pkgTest "knative.dev/pkg/test" "knative.dev/pkg/test/spoof" @@ -40,15 +38,6 @@ import ( v1test "knative.dev/serving/test/v1" ) -var ( - ExpectedSecurityMode = netcfg.TrustEnabled -) - -type RequestLog struct { - RequestURL string `json:"requestUrl"` - TLS tls.ConnectionState `json:"tls"` -} - // TestInternalEncrytion tests the TLS connections between system components. func TestInternalEncryption(t *testing.T) { if !test.ServingFlags.EnableAlphaFeatures {