This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Kuttl (declarative E2E test) implem (#283)
* Add kuttl test scenario scaleUP (WIP) * Test scale up with Kuttl * Add crds in helm directory (casskop & multicasskop) * Delete old beta crds * Update doc * Fix kuttl ScaleUp tests * Fix helm install CRD override * Add the necessary config for test parallelisation (random namespaces) & fix scaleup icarus assert incorrect matching * Add ScaleDown step * Rename test case folder * Add Kuttl to circleci build * Fix indent * Fix makefile * Update Makefile * Update CircleCI kuttl integration * Update config.yml * Update config.yml * Debug cci * Fix config * Add kuttl install circleci * Install brew * Install brew 2 * Fix brew * fix brew * Fix kuttl install * Update config.yml * Fix kuttl install in docker image * Update Dockerfile * Using binary kuttl for installation * Using binary kuttl for installation2 * Update Dockerfile * Update Dockerfile * use cci for kuttl * Update config.yml * Update config.yml * fix arg * Add helm installation * Add doc on "How to run kuttl tests" in developer guide * Remove useless namespace option in doc * Remove useless namespace option in doc (multi casskop) * Fix backup & restore doc example * Update and add spec of Backup & restore documentation * Remove old helm 2 docs refs * set cassandraCluster (with uppercase) in CRDs and definitions * update CRD * Fix tests * Log secret validation error * Update test with new typo * FIX undo some wrong typo changes * Fix test * Applied review asked changes * Rename test * Update with merge of #282 * Remove unused topology * Undo change post merge (distant repo not yet updated) * Fix test * Revert "Merge branch 'helm-3-install-crds' into bdd-testing" This reverts commit bb84620, reversing changes made to ba64023. * Remove event collect Co-authored-by: Cyril Scetbon <cscetbon@gmail.com>
- Loading branch information
1 parent
a311c4d
commit 59562b8
Showing
10 changed files
with
332 additions
and
142 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
status: | ||
cassandraRackStatus: | ||
dc1-rack1: | ||
cassandraLastAction: | ||
name: Initializing | ||
status: Done | ||
phase: Running | ||
lastClusterAction: Initializing | ||
lastClusterActionStatus: Done | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: helm install casskop orange-incubator/cassandra-operator | ||
namespaced: true | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
nodesPerRacks: 1 | ||
cassandraImage: cassandra:latest | ||
dataCapacity: "1Gi" | ||
hardAntiAffinity: false | ||
deletePVC: false | ||
autoPilot: true | ||
autoUpdateSeedList: false | ||
resources: | ||
requests: &requests | ||
cpu: 100m | ||
memory: 512Mi | ||
limits: *requests | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 2 | ||
replicas: 2 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
nodesPerRacks: 2 | ||
status: | ||
cassandraRackStatus: | ||
dc1-rack1: | ||
cassandraLastAction: | ||
name: ScaleUp | ||
status: Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
nodesPerRacks: 2 | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 500 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
nodesPerRacks: 1 | ||
status: | ||
cassandraRackStatus: | ||
dc1-rack1: | ||
cassandraLastAction: | ||
name: ScaleDown | ||
status: Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
nodesPerRacks: 1 | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestSuite | ||
#crdDir: ../../../deploy/crds/ | ||
testDirs: | ||
- . | ||
timeout: 300 | ||
commands: | ||
- command: helm repo add orange-incubator https://orange-kubernetes-charts-incubator.storage.googleapis.com/ | ||
ignoreFailure: true | ||
- command: kubectl apply -f https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/db.orange.com_cassandraclusters_crd.yaml | ||
ignoreFailure: true | ||
- command: kubectl apply -f https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/db.orange.com_cassandrabackups_crd.yaml | ||
ignoreFailure: true | ||
- command: kubectl apply -f https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/db.orange.com_cassandrarestores_crd.yaml | ||
ignoreFailure: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters