Skip to content

Commit

Permalink
chore: fixed e2e tests
Browse files Browse the repository at this point in the history
1. Renamed component Base to Quay
2. Split HPA into multiple steps
  • Loading branch information
ricardomaraschini committed May 4, 2022
1 parent 10d0ad4 commit efc86b3
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 149 deletions.
7 changes: 1 addition & 6 deletions e2e/hpa/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ status:
- message: Quay component healthy
reason: ComponentReady
status: "True"
type: ComponentBaseReady
type: ComponentQuayReady
- message: Deployment hpa-quay-mirror healthy
reason: ComponentReady
status: "True"
Expand All @@ -86,8 +86,3 @@ status:
reason: ComponentsCreationSuccess
status: "False"
type: RolloutBlocked
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 1000
---
27 changes: 1 addition & 26 deletions e2e/hpa/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ status:
- message: Quay component healthy
reason: ComponentReady
status: "True"
type: ComponentBaseReady
type: ComponentQuayReady
- message: Deployment hpa-quay-mirror healthy
reason: ComponentReady
status: "True"
Expand All @@ -87,28 +87,3 @@ status:
reason: ComponentsCreationSuccess
status: "False"
type: RolloutBlocked
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-clair-app
status:
currentReplicas: 3
desiredReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-app
status:
currentReplicas: 3
desiredReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-mirror
status:
currentReplicas: 3
desiredReplicas: 3
---
21 changes: 0 additions & 21 deletions e2e/hpa/01-unmanage-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,3 @@ spec:
managed: true
- kind: tls
managed: true
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-clair-app
spec:
minReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-app
spec:
minReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-mirror
spec:
minReplicas: 3
102 changes: 6 additions & 96 deletions e2e/hpa/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,114 +1,24 @@
---
apiVersion: quay.redhat.com/v1
kind: QuayRegistry
metadata:
finalizers:
- quay-operator/finalizer
name: hpa
spec:
components:
- kind: clair
managed: true
- kind: clairpostgres
managed: true
- kind: quay
managed: true
- kind: postgres
managed: true
- kind: redis
managed: true
- kind: horizontalpodautoscaler
managed: true
- kind: objectstorage
managed: true
- kind: route
managed: true
- kind: mirror
managed: true
- kind: monitoring
managed: true
- kind: tls
managed: true
status:
conditions:
- message: Horizontal pod autoscaler found
reason: ComponentReady
status: "True"
type: ComponentHPAReady
- message: Route admitted
reason: ComponentReady
status: "True"
type: ComponentRouteReady
- message: ServiceMonitor and PrometheusRules created
reason: ComponentReady
status: "True"
type: ComponentMonitoringReady
- message: Deployment hpa-quay-database healthy
reason: ComponentReady
status: "True"
type: ComponentPostgresReady
- message: Object bucket claim bound
reason: ComponentReady
status: "True"
type: ComponentObjectStorageReady
- message: Clair component healthy
reason: ComponentReady
status: "True"
type: ComponentClairReady
- message: ClairPostgres component healthy
reason: ComponentReady
status: "True"
type: ComponentClairPostgresReady
- message: Using cluster wildcard certs
reason: ComponentReady
status: "True"
type: ComponentTLSReady
- message: Deployment hpa-quay-redis healthy
reason: ComponentReady
status: "True"
type: ComponentRedisReady
- message: Quay component healthy
reason: ComponentReady
status: "True"
type: ComponentBaseReady
- message: Deployment hpa-quay-mirror healthy
reason: ComponentReady
status: "True"
type: ComponentMirrorReady
- message: All components reporting as healthy
reason: HealthChecksPassing
status: "True"
type: Available
- message: All registry components created
reason: ComponentsCreationSuccess
status: "True"
type: ComponentsCreated
- message: All objects created/updated successfully
reason: ComponentsCreationSuccess
status: "False"
type: RolloutBlocked
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-clair-app
status:
currentReplicas: 2
desiredReplicas: 2
currentReplicas: 3
desiredReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-app
status:
currentReplicas: 2
desiredReplicas: 2
currentReplicas: 3
desiredReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-mirror
status:
currentReplicas: 2
desiredReplicas: 2
---
currentReplicas: 3
desiredReplicas: 3
21 changes: 21 additions & 0 deletions e2e/hpa/02-bump-hpas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-clair-app
spec:
minReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-app
spec:
minReplicas: 3
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-mirror
spec:
minReplicas: 3
110 changes: 110 additions & 0 deletions e2e/hpa/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
apiVersion: quay.redhat.com/v1
kind: QuayRegistry
metadata:
finalizers:
- quay-operator/finalizer
name: hpa
spec:
components:
- kind: clair
managed: true
- kind: clairpostgres
managed: true
- kind: quay
managed: true
- kind: postgres
managed: true
- kind: redis
managed: true
- kind: horizontalpodautoscaler
managed: true
- kind: objectstorage
managed: true
- kind: route
managed: true
- kind: mirror
managed: true
- kind: monitoring
managed: true
- kind: tls
managed: true
status:
conditions:
- message: Horizontal pod autoscaler found
reason: ComponentReady
status: "True"
type: ComponentHPAReady
- message: Route admitted
reason: ComponentReady
status: "True"
type: ComponentRouteReady
- message: ServiceMonitor and PrometheusRules created
reason: ComponentReady
status: "True"
type: ComponentMonitoringReady
- message: Deployment hpa-quay-database healthy
reason: ComponentReady
status: "True"
type: ComponentPostgresReady
- message: Object bucket claim bound
reason: ComponentReady
status: "True"
type: ComponentObjectStorageReady
- message: Clair component healthy
reason: ComponentReady
status: "True"
type: ComponentClairReady
- message: ClairPostgres component healthy
reason: ComponentReady
status: "True"
type: ComponentClairPostgresReady
- message: Using cluster wildcard certs
reason: ComponentReady
status: "True"
type: ComponentTLSReady
- message: Deployment hpa-quay-redis healthy
reason: ComponentReady
status: "True"
type: ComponentRedisReady
- message: Quay component healthy
reason: ComponentReady
status: "True"
type: ComponentQuayReady
- message: Deployment hpa-quay-mirror healthy
reason: ComponentReady
status: "True"
type: ComponentMirrorReady
- message: All components reporting as healthy
reason: HealthChecksPassing
status: "True"
type: Available
- message: All registry components created
reason: ComponentsCreationSuccess
status: "True"
type: ComponentsCreated
- message: All objects created/updated successfully
reason: ComponentsCreationSuccess
status: "False"
type: RolloutBlocked
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-clair-app
spec:
minReplicas: 2
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-app
spec:
minReplicas: 2
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-quay-mirror
spec:
minReplicas: 2
File renamed without changes.

0 comments on commit efc86b3

Please sign in to comment.