Skip to content

Commit

Permalink
unit test mq secret template in reindex tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Oct 19, 2023
1 parent 1786cbf commit 0bed206
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
40 changes: 39 additions & 1 deletion charts/alfresco-search-enterprise/tests/reindexing-job_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ tests:
configMapKeyRef:
name: RELEASE-NAME-alfresco-search-enterprise-repository
key: REPOSITORY_URL
- contains:
path: spec.template.spec.containers[0].env
content:
name: BROKER_USERNAME
valueFrom:
secretKeyRef:
name: RELEASE-NAME-alfresco-search-enterprise-mq
key: BROKER_USERNAME
- contains:
path: spec.template.spec.containers[0].env
content:
name: BROKER_PASSWORD
valueFrom:
secretKeyRef:
name: RELEASE-NAME-alfresco-search-enterprise-mq
key: BROKER_PASSWORD
- contains:
path: spec.template.spec.containers[0].env
content:
Expand All @@ -38,8 +54,14 @@ tests:
name: RELEASE-NAME-alfresco-database
key: DATABASE_URL

- it: should have overridden secret for spring database credentials when existingSecretName is set
- it: should have overridden secrets when existingSecret is set
set:
messageBroker:
existingSecret:
name: mqsecret
keys:
username: MQUSER
password: MQPASS
reindexing.db:
existingSecret:
name: my-custom-secret
Expand All @@ -51,6 +73,22 @@ tests:
keys:
url: CUSTOM_URL_KEY
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: BROKER_USERNAME
valueFrom:
secretKeyRef:
name: mqsecret
key: MQUSER
- contains:
path: spec.template.spec.containers[0].env
content:
name: BROKER_PASSWORD
valueFrom:
secretKeyRef:
name: mqsecret
key: MQPASS
- contains:
path: spec.template.spec.containers[0].env
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ tests:
set:
activemq.enabled: false
messageBroker:
url: jdbc://
user: ext-admin
url: ssl://mq.domain.tld:61617
username: ext-admin
password: ext-pass
asserts:
- equal:
Expand Down

0 comments on commit 0bed206

Please sign in to comment.