forked from openstack-k8s-operators/horizon-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 pull request openstack-k8s-operators#385 from ashu-011/kuttl_ex…
…tramount Add kuttl tests for extramounts option
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
tests/kuttl/tests/basic-deployment/02-assert-update-extramounts-horizon.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: horizon.openstack.org/v1beta1 | ||
kind: Horizon | ||
metadata: | ||
name: horizon | ||
spec: | ||
extraMounts: | ||
- extraVol: | ||
- extraVolType: Policy | ||
mounts: | ||
- mountPath: /etc/openstack-dashboard/mycustomPolicy.yaml | ||
name: policy | ||
readOnly: true | ||
subPath: mycustomPolicy.yaml | ||
volumes: | ||
- name: policy | ||
name: v1 | ||
region: r1 | ||
replicas: 1 | ||
secret: "osp-secret" | ||
customServiceConfig: | | ||
DEBUG = True | ||
LOGGING['handlers']['console']['level'] = 'DEBUG' |
39 changes: 39 additions & 0 deletions
39
tests/kuttl/tests/basic-deployment/02-update-extramounts-horizon.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: | | ||
touch mycustompolicy.yaml | ||
oc create configmap -n $NAMESPACE horizon-policy --from-file mycustompolicy.yaml | ||
- script: | | ||
oc patch horizon -n $NAMESPACE horizon --type='merge' -p '{ | ||
"spec": { | ||
"extraMounts": [ | ||
{ | ||
"name": "v1", | ||
"region": "r1", | ||
"extraVol": [ | ||
{ | ||
"extraVolType": "Policy", | ||
"mounts": [ | ||
{ | ||
"mountPath": "/etc/openstack-dashboard/mycustomPolicy.yaml", | ||
"name": "policy", | ||
"readOnly": true, | ||
"subPath": "mycustomPolicy.yaml" | ||
} | ||
], | ||
"volumes": [ | ||
{ | ||
"name": "policy", | ||
"configMap": { | ||
"name": "horizon-policy" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}' |