From 3a435fbc82ddb9b21d07c138e5bb26e973841999 Mon Sep 17 00:00:00 2001 From: Ved Ratan Date: Mon, 1 Jul 2024 10:05:13 +0530 Subject: [PATCH] test-fix Signed-off-by: Ved Ratan --- .../coco-workload/create/chainsaw-test.yaml | 13 ++++++- tests/e2e/coco-workload/deploy-assert.yaml | 35 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/coco-workload/deploy-assert.yaml diff --git a/tests/e2e/coco-workload/create/chainsaw-test.yaml b/tests/e2e/coco-workload/create/chainsaw-test.yaml index ed4c705a..ed7ae5ff 100644 --- a/tests/e2e/coco-workload/create/chainsaw-test.yaml +++ b/tests/e2e/coco-workload/create/chainsaw-test.yaml @@ -16,13 +16,24 @@ spec: check: (contains($stdout, 'deployment.apps/nginx created')): true + - name: "Verify deployment creation" + try: + - assert: + file: ../deploy-assert.yaml + - name: "Create a sample runtimeclass" try: - script: - content: kubectl apply -f ../runtime.yaml-n $NAMESPACE + content: kubectl apply -f ../runtime.yaml -n $NAMESPACE check: (contains($stdout, 'runtimeclass.node.k8s.io/kata-clh created')): true + - name: "Verify runtime creation" + try: + - assert: + file: ../runtime.yaml + + - name: "Create a SecurityIntent" try: - apply: diff --git a/tests/e2e/coco-workload/deploy-assert.yaml b/tests/e2e/coco-workload/deploy-assert.yaml new file mode 100644 index 00000000..69016ac3 --- /dev/null +++ b/tests/e2e/coco-workload/deploy-assert.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: nginx + name: nginx +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: nginx + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: nginx + spec: + containers: + - image: nginx + imagePullPolicy: Always + name: nginx + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30