From 693653be4971cdc54b84d570789b104df35f2347 Mon Sep 17 00:00:00 2001 From: Bipul Adhikari Date: Tue, 16 Aug 2022 20:53:05 +0545 Subject: [PATCH] Updates E2E tests Updates Pod templates to pass the admission controller Disables Knative tests Signed-off-by: Bipul Adhikari --- frontend/integration-tests/tests/event.scenario.ts | 12 ++++++++++++ .../tests/app/debug-pod.spec.ts | 9 +++++++++ test-cypress.sh | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/frontend/integration-tests/tests/event.scenario.ts b/frontend/integration-tests/tests/event.scenario.ts index 520c33983dd..e19ddb77297 100644 --- a/frontend/integration-tests/tests/event.scenario.ts +++ b/frontend/integration-tests/tests/event.scenario.ts @@ -12,10 +12,22 @@ describe('Events', () => { namespace: testName, }, spec: { + securityContext: { + runAsNonRoot: true, + seccompProfile: { + type: 'RuntimeDefault', + }, + }, containers: [ { name: 'httpd', image: 'image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest', + securityContext: { + allowPrivilegeEscalation: false, + capabilities: { + drop: ['ALL'], + }, + }, }, ], }, diff --git a/frontend/packages/integration-tests-cypress/tests/app/debug-pod.spec.ts b/frontend/packages/integration-tests-cypress/tests/app/debug-pod.spec.ts index 947718e88c0..e9283f5790f 100644 --- a/frontend/packages/integration-tests-cypress/tests/app/debug-pod.spec.ts +++ b/frontend/packages/integration-tests-cypress/tests/app/debug-pod.spec.ts @@ -14,9 +14,18 @@ kind: Pod metadata: name: ${POD_NAME} spec: + securityContext: + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault containers: - name: ${CONTAINER_NAME} image: quay.io/fedora/fedora + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL restartPolicy: Always`; describe('Debug pod', () => { diff --git a/test-cypress.sh b/test-cypress.sh index 89d728a8bd8..d1542972e45 100755 --- a/test-cypress.sh +++ b/test-cypress.sh @@ -68,7 +68,7 @@ if [ -n "${headless-}" ] && [ -z "${pkg-}" ]; then yarn run test-cypress-dev-console-headless yarn run test-cypress-olm-headless yarn run test-cypress-helm-headless - yarn run test-cypress-knative-headless +# yarn run test-cypress-knative-headless yarn run test-cypress-topology-headless yarn run test-cypress-pipelines-headless exit;