diff --git a/tests/kuttl/test-replica-scaledown-nonzero/00-install.yaml b/tests/kuttl/test-replica-scaledown-nonzero/00-install.yaml new file mode 100644 index 000000000..182dee55b --- /dev/null +++ b/tests/kuttl/test-replica-scaledown-nonzero/00-install.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: test-replica-scaledown-nonzero +spec: + finalizers: + - kubernetes diff --git a/tests/kuttl/test-replica-scaledown-nonzero/01-assert.yaml b/tests/kuttl/test-replica-scaledown-nonzero/01-assert.yaml new file mode 100644 index 000000000..aeae8bc3e --- /dev/null +++ b/tests/kuttl/test-replica-scaledown-nonzero/01-assert.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: puptoo + namespace: test-replica-scaledown-nonzero + labels: + app: puptoo + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: ClowdApp + name: puptoo +type: Opaque +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: puptoo-processor + namespace: test-replica-scaledown-nonzero +spec: + replicas: 4 diff --git a/tests/kuttl/test-replica-scaledown-nonzero/01-pods.yaml b/tests/kuttl/test-replica-scaledown-nonzero/01-pods.yaml new file mode 100644 index 000000000..993e5482b --- /dev/null +++ b/tests/kuttl/test-replica-scaledown-nonzero/01-pods.yaml @@ -0,0 +1,47 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: ClowdEnvironment +metadata: + name: test-replica-scaledown-nonzero +spec: + targetNamespace: test-replica-scaledown-nonzero + providers: + web: + port: 8000 + mode: operator + metrics: + port: 9000 + mode: operator + path: "/metrics" + kafka: + mode: none + db: + mode: none + logging: + mode: none + objectStore: + mode: none + inMemoryDb: + mode: none + featureFlags: + mode: none + resourceDefaults: + limits: + cpu: 400m + memory: 1024Mi + requests: + cpu: 30m + memory: 512Mi +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: ClowdApp +metadata: + name: puptoo + namespace: test-replica-scaledown-nonzero +spec: + envName: test-replica-scaledown-nonzero + deployments: + - name: processor + replicas: 4 + podSpec: + image: quay.io/psav/clowder-hello diff --git a/tests/kuttl/test-replica-scaledown-nonzero/02-assert.yaml b/tests/kuttl/test-replica-scaledown-nonzero/02-assert.yaml new file mode 100644 index 000000000..435bfadb1 --- /dev/null +++ b/tests/kuttl/test-replica-scaledown-nonzero/02-assert.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: puptoo-processor + namespace: test-replica-scaledown-nonzero +spec: + replicas: 1 diff --git a/tests/kuttl/test-replica-scaledown-nonzero/02-pods.yaml b/tests/kuttl/test-replica-scaledown-nonzero/02-pods.yaml new file mode 100644 index 000000000..b8186ad75 --- /dev/null +++ b/tests/kuttl/test-replica-scaledown-nonzero/02-pods.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: ClowdApp +metadata: + name: puptoo + namespace: test-replica-scaledown-nonzero +spec: + envName: test-replica-scaledown-nonzero + deployments: + - name: processor + replicas: 1 + podSpec: + image: quay.io/psav/clowder-hello diff --git a/tests/kuttl/test-replica-scaledown-nonzero/03-delete.yaml b/tests/kuttl/test-replica-scaledown-nonzero/03-delete.yaml new file mode 100644 index 000000000..e01bf4770 --- /dev/null +++ b/tests/kuttl/test-replica-scaledown-nonzero/03-delete.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: v1 + kind: Namespace + name: test-replica-scaledown-nonzero +- apiVersion: cloud.redhat.com/v1alpha1 + kind: ClowdEnvironment + name: test-replica-scaledown-nonzero