From 93f077ea1b9a1b609db404cc8fab0a5f3b517fca Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Thu, 28 Sep 2023 23:51:24 +0200 Subject: [PATCH] add imap tests --- .../alfresco-repository/tests/mail_test.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 charts/alfresco-repository/tests/mail_test.yaml diff --git a/charts/alfresco-repository/tests/mail_test.yaml b/charts/alfresco-repository/tests/mail_test.yaml new file mode 100644 index 000000000..c0591170d --- /dev/null +++ b/charts/alfresco-repository/tests/mail_test.yaml @@ -0,0 +1,48 @@ +--- +suite: test Mail rela ted features +templates: + - deployment.yaml + - service-imap.yaml +values: + - values/test_values.yaml +tests: + - it: should not render any mail resource by default + asserts: + - hasDocuments: + count: 0 + template: service-imap.yaml + - lengthEqual: + path: spec.template.spec.containers[0].ports + count: 2 + template: deployment.yaml + - it: should render imap service deployment with corresponding ports + set: + configuration: + imap: + enabled: true + protocol: imaps + port: 1993 + annotations: + a8r.io/description: &testAnnontaion that's a service to use mail client to browse repo + template: service-imap.yaml + asserts: + - equal: + path: metadata.name + value: RELEASE-NAME-alfresco-repository-imaps + - equal: + path: metadata.annotations['a8r.io/description'] + value: *testAnnontaion + - contains: + path: spec.ports + content: + name: imaps + port: 1993 + protocol: TCP + targetPort: 1993 + - contains: + path: spec.template.spec.containers[0].ports + content: + name: imaps + containerPort: 1993 + protocol: TCP + template: deployment.yaml