Skip to content

Commit

Permalink
chore: add e2e test cases (apecloud#5347)
Browse files Browse the repository at this point in the history
  • Loading branch information
linghan-hub authored Oct 9, 2023
1 parent fa61360 commit 6c41eea
Show file tree
Hide file tree
Showing 77 changed files with 307 additions and 141 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ else ifeq ($(TEST_TYPE), orioledb)
$(HELM) dependency build deploy/orioledb-cluster --skip-refresh
$(HELM) upgrade --install orioledb deploy/orioledb
$(HELM) template oriole-cluster deploy/orioledb-cluster > test/e2e/testdata/smoketest/orioledb/00_orioledbcluster.yaml
else ifeq ($(TEST_TYPE), weaviate)
$(HELM) dependency build deploy/weaviate-cluster --skip-refresh
$(HELM) upgrade --install weaviate deploy/weaviate
$(HELM) template weaviate-cluster deploy/weaviate-cluster > test/e2e/testdata/smoketest/weaviate/00_weaviatecluster.yaml
else
$(error "test type does not exist")
endif
Expand Down Expand Up @@ -708,6 +712,8 @@ else ifeq ($(TEST_TYPE), oceanbase)
$(HELM) upgrade --install official-postgresql deploy/official-postgresql
else ifeq ($(TEST_TYPE), openldap)
$(HELM) upgrade --install openldap deploy/openldap
else ifeq ($(TEST_TYPE), weaviate)
$(HELM) upgrade --install weaviate deploy/weaviate
else
$(error "test type does not exist")
endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: etcd-cluster-hscale-up-
generateName: etcd-cluster-hscale-out-
spec:
clusterRef: etcd-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: etcd-cluster-hscale-down-
generateName: etcd-cluster-hscale-in-
spec:
clusterRef: etcd-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: foxlake-cluster-hscale-up-
generateName: foxlake-cluster-hscale-out-
spec:
clusterRef: foxlake-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: foxlake-cluster-hscale-down-
generateName: foxlake-cluster-hscale-in-
spec:
clusterRef: foxlake-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: greptimedb-cluster-hscale-up-
generateName: greptimedb-cluster-hscale-in-
spec:
clusterRef: greptimedb-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: greptimedb-cluster-hscale-down-
generateName: greptimedb-cluster-hscale-out-
spec:
clusterRef: greptimedb-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: kafka-cluster-hscale-up-
generateName: kafka-cluster-hscale-out-
spec:
clusterRef: kafka-cluster
type: HorizontalScaling
Expand Down
18 changes: 18 additions & 0 deletions test/e2e/testdata/smoketest/kafka/06_reconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: kafka-cluster-reconfiguring-
spec:
clusterRef: kafka-cluster
reconfigure:
componentName: broker
configurations:
- keys:
- key: kafka-configuration-tpl
parameters:
- key: MaxRAMPercentage
value: "200"
- key: MaxGCPauseMillis
value: "30"
name: mysql-consensusset-config
type: Reconfiguring
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/mongodb/06_hscale_out.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: mongodb-cluster-hscale-out-
spec:
clusterRef: mongodb-cluster
type: HorizontalScaling
horizontalScaling:
- componentName: mongodb
replicas: 3
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: kafka-cluster-hscale-down-
generateName: mongodb-cluster-hscale-in-
spec:
clusterRef: kafka-cluster
clusterRef: mongodb-cluster
type: HorizontalScaling
horizontalScaling:
- componentName: broker
replicas: 2
- componentName: mongodb
replicas: 1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: nebula-cluster-hscale-up-
generateName: nebula-cluster-hscale-out-
spec:
clusterRef: nebula-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: nebula-cluster-hscale-down-
generateName: nebula-cluster-hscale-in-
spec:
clusterRef: nebula-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: oceanbase-cluster-hscale-up-
generateName: oceanbase-cluster-hscale-out-
spec:
clusterRef: oceanbase-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: oceanbase-cluster-hscale-down-
generateName: oceanbase-cluster-hscale-in-
spec:
clusterRef: oceanbase-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: official-pg-hscale-up-
generateName: official-pg-hscale-out-
spec:
clusterRef: official-pg
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: official-pg-hscale-down-
generateName: official-pg-hscale-in-
spec:
clusterRef: official-pg
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: openldap-cluster-hscale-up-
generateName: openldap-cluster-hscale-out-
spec:
clusterRef: openldap-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: openldap-cluster-hscale-down-
generateName: openldap-cluster-hscale-in-
spec:
clusterRef: openldap-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: oracle-cluster-hscale-up-
generateName: oracle-cluster-hscale-out-
spec:
clusterRef: oracle-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: oracle-cluster-hscale-down-
generateName: oracle-cluster-hscale-in-
spec:
clusterRef: oracle-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: orioledb-cluster-hscale-up-
generateName: orioledb-cluster-hscale-out-
spec:
clusterRef: orioledb-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: orioledb-cluster-hscale-down-
generateName: orioledb-cluster-hscale-in-
spec:
clusterRef: orioledb-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pg-cluster-hscale-up-
generateName: pg-cluster-hscale-out-
spec:
clusterRef: pg-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pg-cluster-hscale-down-
generateName: pg-cluster-hscale-in-
spec:
clusterRef: pg-cluster
type: HorizontalScaling
Expand Down
18 changes: 18 additions & 0 deletions test/e2e/testdata/smoketest/postgresql/10_reconfigure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pg-cluster-reconfiguring-
spec:
clusterRef: pg-cluster
reconfigure:
componentName: postgresql
configurations:
- keys:
- key: postgresql.conf
parameters:
- key: max_connections
value: "60"
- key: checkpoint_timeout
value: "20min"
name: postgresql-configuration
type: Reconfiguring
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/pulsar/01_stop_bookies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-stop-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Stop
restart:
- componentName: bookies
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/pulsar/02_start_bookies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-start-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Start
restart:
- componentName: bookies
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-restart-proxy-
generateName: pulsar-cluster-restart-bookies-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Restart
restart:
- componentName: proxy
- componentName: bookies
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
03_restart_zookeeper:
yaml:
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
Expand Down
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/pulsar/05_stop_broker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-stop-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Stop
restart:
- componentName: broker
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/pulsar/06_start_broker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-start-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Start
restart:
- componentName: broker
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/pulsar/08_stop_zookeeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-stop-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Stop
restart:
- componentName: zookeeper
10 changes: 10 additions & 0 deletions test/e2e/testdata/smoketest/pulsar/09_start_zookeeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-cluster-start-
spec:
clusterRef: pulsar-cluster
ttlSecondsAfterSucceed: 3600
type: Start
restart:
- componentName: zookeeper
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-horizontalscaling-up-
generateName: pulsar-horizontalscaling-out-
spec:
clusterRef: pulsar-cluster
type: HorizontalScaling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pulsar-horizontalscaling-down-
generateName: pulsar-horizontalscaling-in-
spec:
clusterRef: pulsar-cluster
type: HorizontalScaling
Expand Down
Loading

0 comments on commit 6c41eea

Please sign in to comment.