Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Dec 10, 2024
1 parent 9251cab commit 3f66719
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions charts/alfresco-search-service/tests/ingress_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3f66719

Please sign in to comment.