Skip to content

Commit

Permalink
add non-zero scaledown test
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Jan 3, 2025
1 parent bbd2ab8 commit 1fb1eab
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/kuttl/test-replica-scaledown-nonzero/00-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: test-replica-scaledown-nonzero
spec:
finalizers:
- kubernetes
21 changes: 21 additions & 0 deletions tests/kuttl/test-replica-scaledown-nonzero/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions tests/kuttl/test-replica-scaledown-nonzero/01-pods.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions tests/kuttl/test-replica-scaledown-nonzero/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: puptoo-processor
namespace: test-replica-scaledown-nonzero
spec:
replicas: 1
13 changes: 13 additions & 0 deletions tests/kuttl/test-replica-scaledown-nonzero/02-pods.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions tests/kuttl/test-replica-scaledown-nonzero/03-delete.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1fb1eab

Please sign in to comment.