forked from obeleh/db-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kuttl-test-mysql.yaml
33 lines (33 loc) · 1.22 KB
/
kuttl-test-mysql.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
name: MySql
testDirs:
- ./tests/mysql
manifestDirs:
- ./tests/mysql-manifests/
# kindConfig: tests/kind-config.yaml
# startKIND: true
# startControlPlane: true
kindContainers:
- library/mysql:latest
commands:
# wait for DNS to be available to avoid flaky tests
- command: kubectl wait --timeout=2m --for=condition=available deployment coredns -n kube-system
- command: kubectl get deployment -A
# deploy our operator
- command: make deploy-kind
# wait a bunch
- command: kubectl get deployment -A
- command: kubectl wait --timeout=3m --for=condition=available deployment mysql-db-server -n mysql
- command: kubectl get deployment -A
- command: kubectl wait --timeout=1m --for=condition=available deployment db-operator-controller-manager -n db-operator-system
- command: kubectl get deployment -A
# wait again, mysql might be restarting due to initialisation cycle
- command: sleep 5
- command: kubectl wait --timeout=30s --for=condition=available deployment mysql-db-server -n mysql
- command: kubectl get deployment -A
# we're sharing the database, in order to have predictable state we don't do parallel tests
parallel: 1
artifactsDir: ./tests/outputs
kindNodeCache: true
timeout: 50 # ci is slow