diff --git a/tests/kuttl/tests/basic-deployment/02-assert-update-extramounts-horizon.yaml b/tests/kuttl/tests/basic-deployment/02-assert-update-extramounts-horizon.yaml new file mode 100644 index 00000000..2e737187 --- /dev/null +++ b/tests/kuttl/tests/basic-deployment/02-assert-update-extramounts-horizon.yaml @@ -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' diff --git a/tests/kuttl/tests/basic-deployment/02-update-extramounts-horizon.yaml b/tests/kuttl/tests/basic-deployment/02-update-extramounts-horizon.yaml new file mode 100644 index 00000000..23dfc3e2 --- /dev/null +++ b/tests/kuttl/tests/basic-deployment/02-update-extramounts-horizon.yaml @@ -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" + } + } + ] + } + ] + } + ] + } + }'