forked from OT-CONTAINER-KIT/redis-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge the e2e Test Files (OT-CONTAINER-KIT#623)
Signed-off-by: Shubham Gupta <[email protected]> Signed-off-by: Matt Robinson <[email protected]>
- Loading branch information
1 parent
0ca71da
commit 2e37043
Showing
14 changed files
with
116 additions
and
44 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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,8 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestSuite | ||
startKIND: false | ||
kindConfig: "./kind-config.yaml" | ||
parallel: 1 | ||
timeout: 300 | ||
suppress : | ||
- events |
This file was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
tests/e2e/setup/00-install.yaml → tests/e2e/v1beta1/setup/00-install.yaml
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
apply : | ||
- standalone.yaml | ||
- cluster.yaml | ||
assert : | ||
- ready-standalone.yaml | ||
- ready-cluster.yaml | ||
- ready-cluster.yaml | ||
- ready-cluster-sts.yaml |
32 changes: 17 additions & 15 deletions
32
tests/e2e/setup/standalone.yaml → tests/e2e/v1beta1/setup/cluster.yaml
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
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,7 @@ | ||
apiVersion: redis.redis.opstreelabs.in/v1beta1 | ||
kind: RedisCluster | ||
metadata: | ||
name: redis-cluster-v1beta1 | ||
status: | ||
readyFollowerReplicas: 3 | ||
readyLeaderReplicas: 3 |
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,7 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
apply : | ||
- cluster.yaml | ||
assert : | ||
- ready-cluster.yaml | ||
- ready-cluster-sts.yaml |
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,17 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: redis-cluster-v1beta2-leader | ||
status: | ||
replicas: 3 | ||
readyReplicas: 3 | ||
|
||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: redis-cluster-v1beta2-follower | ||
status: | ||
replicas: 3 | ||
readyReplicas: 3 |
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,7 @@ | ||
apiVersion: redis.redis.opstreelabs.in/v1beta1 | ||
kind: RedisCluster | ||
metadata: | ||
name: redis-cluster-v1beta2 | ||
status: | ||
# readyFollowerReplicas: 3 | ||
readyLeaderReplicas: 3 |
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,42 @@ | ||
# E2E Testing of the Redis Cluster with Kuttl | ||
|
||
This guide will walk you through the process of end-to-end (E2E) testing a Redis cluster using the `kuttl` utility. | ||
|
||
## **Prerequisites** | ||
|
||
Ensure you have the following tools installed: | ||
|
||
- **kuttl**: For testing. [Installation Guide](https://kuttl.dev/docs/installation/) | ||
- **kind**: For local Kubernetes clusters. [Installation Guide](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) | ||
- **kubectl**: Kubernetes command-line tool. [Installation Guide](https://kubernetes.io/docs/tasks/tools/install-kubectl/) | ||
- **helm**: Package manager for Kubernetes. [Installation Guide](https://helm.sh/docs/intro/install/) | ||
|
||
## **Steps** | ||
|
||
### **1. Set Up a 3-node Kind Cluster** | ||
|
||
## Steps to Follow | ||
|
||
### 1. Set Up a 3-node Kind Cluster | ||
|
||
Create a 3-node kind cluster using the provided configuration: | ||
|
||
```bash | ||
kind create cluster --config /redis-operator/tests/_config/kind-example-config.yaml | ||
``` | ||
|
||
### 2. Install the Redis Operator | ||
|
||
To install the Redis operator, utilize the Helm chart from the repository provided: | ||
|
||
- [OT-CONTAINER-KIT Redis Operator Helm Chart](https://github.com/OT-CONTAINER-KIT/helm-charts/tree/main/charts/redis-operator#readme) | ||
|
||
Please refer to the repository's README for detailed instructions on installing the operator using Helm. | ||
|
||
### 3. Execute Kuttl Test | ||
|
||
Execute the kuttl test using the following command: | ||
|
||
```bash | ||
kubectl kuttl test redis-operator/tests/e2e/v1beta2 --config /redis-operator/tests/_config/kuttl-test.yaml --timeout 10m | ||
``` |