Skip to content

Commit

Permalink
test: remove some duplicated e2e case (#1114)
Browse files Browse the repository at this point in the history
* cleanup: remove some duplicated e2e case

Signed-off-by: drivebyer <[email protected]>

* cleanup: remove some duplicated e2e case

Signed-off-by: drivebyer <[email protected]>

* cleanup: remove some duplicated e2e case

Signed-off-by: drivebyer <[email protected]>

* move

Signed-off-by: drivebyer <[email protected]>

* avoid context deadline exceeded

Signed-off-by: drivebyer <[email protected]>

* remove useless

Signed-off-by: drivebyer <[email protected]>

* remove useless

Signed-off-by: drivebyer <[email protected]>

* remove useless

Signed-off-by: drivebyer <[email protected]>

* rename

Signed-off-by: drivebyer <[email protected]>

* add parallel

Signed-off-by: drivebyer <[email protected]>

* fix gsed

Signed-off-by: drivebyer <[email protected]>

* remove

Signed-off-by: drivebyer <[email protected]>

* remove

Signed-off-by: drivebyer <[email protected]>

* remove

Signed-off-by: drivebyer <[email protected]>

---------

Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer authored Nov 5, 2024
1 parent 89b18fe commit 9d37c6e
Show file tree
Hide file tree
Showing 109 changed files with 127 additions and 5,150 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
redis-version: ["v7.0.15", "v6.2.14"]
redis-version: ["v7.0.15"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -251,8 +251,8 @@ jobs:
- name: Replace Redis Image Version
run: |
find ./tests/e2e-chainsaw/v1beta2/ -type f -exec gsed -i 's/quay.io\/opstree\/redis:latest/quay.io\/opstree\/redis:${{ matrix.redis-version }}/g' {} \;
find ./tests/e2e-chainsaw/v1beta2/ -type f -exec gsed -i 's/quay.io\/opstree\/redis-sentinel:latest/quay.io\/opstree\/redis-sentinel:${{ matrix.redis-version }}/g' {} \;
find ./tests/e2e-chainsaw/v1beta2/ -type f -exec sed -i 's/quay.io\/opstree\/redis:latest/quay.io\/opstree\/redis:${{ matrix.redis-version }}/g' {} \;
find ./tests/e2e-chainsaw/v1beta2/ -type f -exec sed -i 's/quay.io\/opstree\/redis-sentinel:latest/quay.io\/opstree\/redis-sentinel:${{ matrix.redis-version }}/g' {} \;
- name: Run chainsaw test
run: chainsaw test --test-dir ./tests/e2e-chainsaw/v1beta2/ --config tests/_config/chainsaw-configuration.yaml
3 changes: 2 additions & 1 deletion tests/_config/chainsaw-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ metadata:
spec:
execution:
failFast: true
parallel: 10
cleanup:
delayBeforeCleanup: 10s
skipDelete: true
timeouts:
apply: 5m
delete: 5m
Expand Down
131 changes: 2 additions & 129 deletions tests/e2e-chainsaw/v1beta2/acl-user/redis-cluster/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: redis-cluster-setup
name: acl-user-redis-cluster
spec:
steps:
- try:
Expand All @@ -19,99 +19,7 @@ spec:
file: cluster.yaml
- assert:
file: ready-cluster.yaml
- assert:
file: ready-sts.yaml
- assert:
file: ready-svc.yaml
- assert:
file: ready-pvc.yaml
catch:
- description: Redis Operator Logs
podLogs:
namespace: redis-operator-system
selector: control-plane=redis-operator
container: manager
tail: -1 # tail all logs
- name: Sleep for five minutes
try:
- sleep:
duration: 5m
- name: Ping Cluster Nodes
try:
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-0 --
redis-cli -c -p 6379 ping
check:
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-1 --
redis-cli -c -p 6379 ping
check:
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-2 --
redis-cli -c -p 6379 ping
check:
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-0 --
redis-cli -c -p 6379 ping
check:
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-1 --
redis-cli -c -p 6379 ping
check:
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-2 --
redis-cli -c -p 6379 ping
check:
(contains($stdout, 'PONG')): true
- name: Check Cluster Slots Coverage
try:
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-0 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered.'
check:
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-1 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-2 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-0 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-1 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-2 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
(contains($stdout, '[OK] All 16384 slots covered')): true

- name: Try saving a key With Password
try:
- script:
Expand All @@ -121,38 +29,3 @@ spec:
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-0 bar-0
check:
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-1 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-1 bar-1
check:
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-2 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-2 bar-2
check:
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-0 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-3 bar-3
check:
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-1 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-4 bar-4
check:
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-2 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-5 bar-5
check:
(contains($stdout, 'OK')): true
168 changes: 0 additions & 168 deletions tests/e2e-chainsaw/v1beta2/acl-user/redis-cluster/ready-pvc.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions tests/e2e-chainsaw/v1beta2/acl-user/redis-cluster/ready-sts.yaml

This file was deleted.

Loading

0 comments on commit 9d37c6e

Please sign in to comment.