-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d447f06
commit f31658a
Showing
3 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
suite: test reports_secret.yaml | ||
templates: | ||
- reports_secret.yaml | ||
|
||
tests: | ||
- it: should create a reports secret if core.reportsSecretName is not set | ||
set: | ||
core.reportsSecretName: "" | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: kind | ||
value: Secret | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-reports-secret | ||
- equal: | ||
path: type | ||
value: Opaque | ||
- exists: | ||
path: data.htpasswd | ||
- exists: | ||
path: data.REPORTS_PASS | ||
- 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 | ||
|
||
- it: should not create a database secret if reports.reportsSecretName is set | ||
set: | ||
reports.reportsSecretName: "custom-reports-secret" | ||
asserts: | ||
- hasDocuments: | ||
count: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
suite: test reports_service.yaml | ||
templates: | ||
- reports_service.yaml | ||
|
||
tests: | ||
- it: should do nothing if report generators are not desired | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: should create a Service targeting the Pod http port | ||
set: | ||
reports: | ||
replicas: 1 | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: kind | ||
value: Service | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-cryostat-reports | ||
- equal: | ||
path: spec.type | ||
value: ClusterIP | ||
- equal: | ||
path: spec.ports[0].port | ||
value: 10001 | ||
- equal: | ||
path: spec.ports[0].targetPort | ||
value: http | ||
- 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 | ||
app.kubernetes.io/component: reports | ||
|
||
- it: should create a Service targeting the Pod https port when deployed in OpenShift | ||
set: | ||
reports: | ||
replicas: 1 | ||
authentication: | ||
openshift: | ||
enabled: true | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: kind | ||
value: Service | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-cryostat-reports | ||
- equal: | ||
path: spec.type | ||
value: ClusterIP | ||
- equal: | ||
path: spec.ports[0].port | ||
value: 10001 | ||
- equal: | ||
path: spec.ports[0].targetPort | ||
value: https | ||
- 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 | ||
app.kubernetes.io/component: reports |