Skip to content

Commit

Permalink
resolve issues && add test unit
Browse files Browse the repository at this point in the history
  • Loading branch information
aali309 committed Jul 16, 2024
1 parent 9f2135f commit 438c0af
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/cryostat/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests:
- equal:
path: metadata.labels
value:
helm.sh/chart: cryostat-0.5.0-dev
helm.sh/chart: cryostat-2.0.0-dev
app.kubernetes.io/name: cryostat
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/version: "4.0.0-dev"
Expand Down
2 changes: 1 addition & 1 deletion charts/cryostat/tests/pvc_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tests:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: cryostat
app.kubernetes.io/version: "4.0.0-dev"
helm.sh/chart: cryostat-0.5.0-dev
helm.sh/chart: cryostat-2.0.0-dev
- equal:
path: spec.accessModes
value:
Expand Down
4 changes: 2 additions & 2 deletions charts/cryostat/tests/role_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: cryostat
app.kubernetes.io/version: "4.0.0-dev"
helm.sh/chart: cryostat-0.5.0-dev
helm.sh/chart: cryostat-2.0.0-dev
documentIndex: 0
- equal:
path: metadata.labels
Expand All @@ -48,7 +48,7 @@ tests:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: cryostat
app.kubernetes.io/version: "4.0.0-dev"
helm.sh/chart: cryostat-0.5.0-dev
helm.sh/chart: cryostat-2.0.0-dev
documentIndex: 1

- it: should have correct permissions for endpoints, pods, and other resources
Expand Down
2 changes: 1 addition & 1 deletion charts/cryostat/tests/route_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tests:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: cryostat
app.kubernetes.io/version: "4.0.0-dev"
helm.sh/chart: cryostat-0.5.0-dev
helm.sh/chart: cryostat-2.0.0-dev
- equal:
path: metadata.annotations.hello
value: "world"
Expand Down
58 changes: 58 additions & 0 deletions charts/cryostat/tests/service_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,64 @@ tests:
app.kubernetes.io/version: "4.0.0-dev"
helm.sh/chart: cryostat-2.0.0-dev

- it: should create a Service with the correct settings when OpenShift authentication is enabled
set:
authentication.openshift.enabled: true
asserts:
- hasDocuments:
count: 1
- equal:
path: kind
value: Service
- equal:
path: metadata.name
value: RELEASE-NAME-cryostat
- equal:
path: spec.type
value: ClusterIP
- equal:
path: spec.ports[0].port
value: 8181
- equal:
path: spec.ports[0].targetPort
value: 4180
- equal:
path: spec.ports[0].protocol
value: TCP
- equal:
path: spec.ports[0].name
value: cryostat-http
- equal:
path: spec.ports[1].port
value: 443
- equal:
path: spec.ports[1].targetPort
value: 8443
- equal:
path: spec.ports[1].protocol
value: TCP
- equal:
path: spec.ports[1].name
value: cryostat-https
- equal:
path: spec.selector
value:
app.kubernetes.io/name: cryostat
app.kubernetes.io/instance: RELEASE-NAME
- equal:
path: metadata.labels
value:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: cryostat
app.kubernetes.io/version: "4.0.0-dev"
helm.sh/chart: cryostat-2.0.0-dev
- equal:
path: metadata.annotations
value:
service.alpha.openshift.io/serving-cert-secret-name: RELEASE-NAME-proxy-tls


- it: should include OpenShift specific annotations when OpenShift auth is enabled
set:
authentication.openshift.enabled: true
Expand Down

0 comments on commit 438c0af

Please sign in to comment.