Skip to content

Commit f991053

Browse files
author
Mauricio Harley
committed
Rename KUTTL tests dir to fix the tests on install_yamls
1 parent 3b1359a commit f991053

12 files changed

+253
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apiVersion: barbican.openstack.org/v1beta1
2+
kind: Barbican
3+
metadata:
4+
name: barbican
5+
spec:
6+
serviceUser: barbican
7+
customServiceConfig: |
8+
[DEFAULT]
9+
debug = True
10+
databaseInstance: openstack
11+
databaseUser: barbican
12+
rabbitMqClusterName: rabbitmq
13+
barbicanAPI:
14+
replicas: 1
15+
barbicanWorker:
16+
replicas: 1
17+
barbicanKeystoneListener:
18+
replicas: 1
19+
---
20+
apiVersion: apps/v1
21+
kind: Deployment
22+
metadata:
23+
name: barbican-api-api
24+
ownerReferences:
25+
- apiVersion: barbican.openstack.org/v1beta1
26+
blockOwnerDeletion: true
27+
controller: true
28+
kind: BarbicanAPI
29+
name: barbican-api
30+
---
31+
apiVersion: apps/v1
32+
kind: Deployment
33+
metadata:
34+
name: barbican-keystone-listener-keystone-listener
35+
ownerReferences:
36+
- apiVersion: barbican.openstack.org/v1beta1
37+
blockOwnerDeletion: true
38+
controller: true
39+
kind: BarbicanKeystoneListener
40+
name: barbican-keystone-listener
41+
---
42+
apiVersion: apps/v1
43+
kind: Deployment
44+
metadata:
45+
name: barbican-worker-worker
46+
ownerReferences:
47+
- apiVersion: barbican.openstack.org/v1beta1
48+
blockOwnerDeletion: true
49+
controller: true
50+
kind: BarbicanWorker
51+
name: barbican-worker
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../common/assert_sample_deployment.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
cp ../../../../config/samples/barbican_v1beta1_barbican.*yaml deploy
6+
oc kustomize deploy | oc apply -n $NAMESPACE -f -
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# Check for:
3+
# - Barbican CRs with 2 replicas for each one
4+
# - BarbicanAPI barbican-api Deployment with 2 replicas
5+
# - BarbicanKeystoneListener barbican-keystone-listener Deployment with 2 replicas
6+
# - BarbicanWorker barbican-worker Deployment with 2 replicas
7+
8+
9+
apiVersion: barbican.openstack.org/v1beta1
10+
kind: Barbican
11+
metadata:
12+
name: barbican
13+
spec:
14+
barbicanAPI:
15+
replicas: 2
16+
barbicanKeystoneListener:
17+
replicas: 2
18+
barbicanWorker:
19+
replicas: 2
20+
---
21+
apiVersion: apps/v1
22+
kind: Deployment
23+
metadata:
24+
name: barbican-api-api
25+
spec:
26+
replicas: 2
27+
status:
28+
availableReplicas: 2
29+
replicas: 2
30+
---
31+
apiVersion: apps/v1
32+
kind: Deployment
33+
metadata:
34+
name: barbican-keystone-listener-keystone-listener
35+
spec:
36+
replicas: 2
37+
status:
38+
availableReplicas: 2
39+
replicas: 2
40+
---
41+
apiVersion: apps/v1
42+
kind: Deployment
43+
metadata:
44+
name: barbican-worker-worker
45+
spec:
46+
replicas: 2
47+
status:
48+
availableReplicas: 2
49+
replicas: 2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanAPI/replicas", "value":2}]'
6+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanKeystoneListener/replicas", "value":2}]'
7+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanWorker/replicas", "value":2}]'
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# Check for:
3+
# - Barbican CRs with12 replicas for each one
4+
# - BarbicanAPI barbican-api Deployment with 1 replica
5+
# - BarbicanKeystoneListener barbican-keystone-listener Deployment with 1 replica
6+
# - BarbicanWorker barbican-worker Deployment with 1 replica
7+
8+
9+
apiVersion: barbican.openstack.org/v1beta1
10+
kind: Barbican
11+
metadata:
12+
name: barbican
13+
spec:
14+
barbicanAPI:
15+
replicas: 1
16+
barbicanKeystoneListener:
17+
replicas: 1
18+
barbicanWorker:
19+
replicas: 1
20+
---
21+
apiVersion: apps/v1
22+
kind: Deployment
23+
metadata:
24+
name: barbican-api-api
25+
spec:
26+
replicas: 1
27+
status:
28+
availableReplicas: 1
29+
replicas: 1
30+
---
31+
apiVersion: apps/v1
32+
kind: Deployment
33+
metadata:
34+
name: barbican-keystone-listener-keystone-listener
35+
spec:
36+
replicas: 1
37+
status:
38+
availableReplicas: 1
39+
replicas: 1
40+
---
41+
apiVersion: apps/v1
42+
kind: Deployment
43+
metadata:
44+
name: barbican-worker-worker
45+
spec:
46+
replicas: 1
47+
status:
48+
availableReplicas: 1
49+
replicas: 1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanAPI/replicas", "value":1}]'
6+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanKeystoneListener/replicas", "value":1}]'
7+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanWorker/replicas", "value":1}]'
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Check for:
3+
# - Barbican CRs with 0 replicas for each one
4+
# - BarbicanAPI barbican-api Deployment with 0 replicas
5+
# - BarbicanKeystoneListener barbican-keystone-listener Deployment with 0 replicas
6+
# - BarbicanWorker barbican-worker Deployment with 0 replicas
7+
8+
9+
apiVersion: barbican.openstack.org/v1beta1
10+
kind: Barbican
11+
metadata:
12+
name: barbican
13+
spec:
14+
barbicanAPI:
15+
replicas: 0
16+
barbicanKeystoneListener:
17+
replicas: 0
18+
barbicanWorker:
19+
replicas: 0
20+
---
21+
apiVersion: apps/v1
22+
kind: Deployment
23+
metadata:
24+
name: barbican-api-api
25+
spec:
26+
replicas: 0
27+
---
28+
apiVersion: apps/v1
29+
kind: Deployment
30+
metadata:
31+
name: barbican-keystone-listener-keystone-listener
32+
spec:
33+
replicas: 0
34+
---
35+
apiVersion: apps/v1
36+
kind: Deployment
37+
metadata:
38+
name: barbican-worker-worker
39+
spec:
40+
replicas: 0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanAPI/replicas", "value":0}]'
6+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanKeystoneListener/replicas", "value":0}]'
7+
oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanWorker/replicas", "value":0}]'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
oc kustomize deploy | oc delete -n $NAMESPACE -f -
6+
rm deploy/barbican_v1beta1_barbican.yaml
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Check for:
3+
#
4+
# No BarbicanAPI CR
5+
# No Deployment for BarbicanAPI CR
6+
# No Pods in barbican Deployment
7+
# No Barbican Services
8+
#
9+
apiVersion: barbican.openstack.org/v1beta1
10+
kind: Barbican
11+
metadata:
12+
name: barbican
13+
---
14+
apiVersion: apps/v1
15+
kind: Deployment
16+
metadata:
17+
name: barbican
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- ./barbican_v1beta1_barbican.yaml
5+
patches:
6+
- patch: |-
7+
- op: replace
8+
path: /spec/secret
9+
value: osp-secret
10+
- op: replace
11+
path: /metadata/namespace
12+
target:
13+
kind: Barbican

0 commit comments

Comments
 (0)