From 3f667194842f503171192779aa2580b389ff08c6 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 10 Dec 2024 16:16:27 +0100 Subject: [PATCH] add tests --- .../tests/ingress-conector-ms365_test.yaml | 37 ++++++++++++++++ .../tests/ingress-connector-msteams_test.yaml | 37 ++++++++++++++++ .../tests/ingress_test.yaml | 41 ++++++++++++++++++ .../tests/ingress_test.yaml | 42 +++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/ingress_test.yaml diff --git a/charts/alfresco-connector-ms365/tests/ingress-conector-ms365_test.yaml b/charts/alfresco-connector-ms365/tests/ingress-conector-ms365_test.yaml index 52161d1e9..d2a0f3d04 100644 --- a/charts/alfresco-connector-ms365/tests/ingress-conector-ms365_test.yaml +++ b/charts/alfresco-connector-ms365/tests/ingress-conector-ms365_test.yaml @@ -21,3 +21,40 @@ tests: - equal: path: spec.ingressClassName value: nginx +- it: should render default rules + asserts: + - equal: + path: spec.rules + value: + - host: + http: + paths: + - backend: + service: + name: RELEASE-NAME-alfresco-connector-ms365 + port: + number: 80 + path: /ooi-service + pathType: Prefix +- it: should render rules with host + set: + ingress: + hosts: + - host: testhost + paths: + - path: /ooi-service + pathType: Prefix + asserts: + - equal: + path: spec.rules + value: + - host: testhost + http: + paths: + - backend: + service: + name: RELEASE-NAME-alfresco-connector-ms365 + port: + number: 80 + path: /ooi-service + pathType: Prefix diff --git a/charts/alfresco-connector-msteams/tests/ingress-connector-msteams_test.yaml b/charts/alfresco-connector-msteams/tests/ingress-connector-msteams_test.yaml index 3291a3ebf..50259a472 100644 --- a/charts/alfresco-connector-msteams/tests/ingress-connector-msteams_test.yaml +++ b/charts/alfresco-connector-msteams/tests/ingress-connector-msteams_test.yaml @@ -21,3 +21,40 @@ tests: - equal: path: spec.ingressClassName value: nginx +- it: should render default rules + asserts: + - equal: + path: spec.rules + value: + - host: + http: + paths: + - backend: + service: + name: RELEASE-NAME-alfresco-connector-msteams + port: + number: 80 + path: /ms-teams-service + pathType: Prefix +- it: should render rules with host + set: + ingress: + hosts: + - host: testhost + paths: + - path: /ms-teams-service + pathType: Prefix + asserts: + - equal: + path: spec.rules + value: + - host: testhost + http: + paths: + - backend: + service: + name: RELEASE-NAME-alfresco-connector-msteams + port: + number: 80 + path: /ms-teams-service + pathType: Prefix diff --git a/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/ingress_test.yaml b/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/ingress_test.yaml new file mode 100644 index 000000000..5e8a6ceda --- /dev/null +++ b/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/ingress_test.yaml @@ -0,0 +1,41 @@ +suite: test zeppelin ingress +templates: +- ingress.yaml +tests: +- it: should render default rules + asserts: + - equal: + path: spec.rules + value: + - host: + http: + paths: + - backend: + service: + name: RELEASE-NAME-alfresco-insight-zeppelin + port: + number: 80 + path: /zeppelin + pathType: Prefix +- it: should render rules with host + set: + ingress: + hosts: + - host: testhost + paths: + - path: /zeppelin + pathType: Prefix + asserts: + - equal: + path: spec.rules + value: + - host: testhost + http: + paths: + - backend: + service: + name: RELEASE-NAME-alfresco-insight-zeppelin + port: + number: 80 + path: /zeppelin + pathType: Prefix diff --git a/charts/alfresco-search-service/tests/ingress_test.yaml b/charts/alfresco-search-service/tests/ingress_test.yaml index 0d37faf4b..8f11a7a91 100644 --- a/charts/alfresco-search-service/tests/ingress_test.yaml +++ b/charts/alfresco-search-service/tests/ingress_test.yaml @@ -59,3 +59,45 @@ tests: app.kubernetes.io/name: testName app.kubernetes.io/version: 2.0.0 helm.sh/chart: alfresco-search-service-1.0.0 + + - it: should render default rules + set: + ingress: + enabled: true + asserts: + - equal: + path: spec.rules + value: + - host: + http: + paths: + - backend: + service: + name: RELEASE-NAME-solr + port: + number: 80 + path: /solr + pathType: Prefix + - it: should render rules with host + set: + ingress: + enabled: true + hosts: + - host: testhost + paths: + - path: /solr + pathType: Prefix + asserts: + - equal: + path: spec.rules + value: + - host: testhost + http: + paths: + - backend: + service: + name: RELEASE-NAME-solr + port: + number: 80 + path: /solr + pathType: Prefix