-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Marco Ebert <[email protected]>
- Loading branch information
1 parent
fc00ca8
commit 883cc88
Showing
5 changed files
with
48 additions
and
1 deletion.
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
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
charts/ingress-nginx/tests/controller-prometheusrule_test.yaml
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,17 @@ | ||
suite: Controller > PrometheusRule | ||
templates: | ||
- controller-prometheusrule.yaml | ||
|
||
tests: | ||
- it: should create a PrometheusRule if `controller.metrics.prometheusRule.enabled` is true | ||
set: | ||
controller.metrics.enabled: true | ||
controller.metrics.prometheusRule.enabled: true | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: PrometheusRule | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ingress-nginx-controller |
29 changes: 29 additions & 0 deletions
29
charts/ingress-nginx/tests/controller-servicemonitor_test.yaml
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,29 @@ | ||
suite: Controller > ServiceMonitor | ||
templates: | ||
- controller-servicemonitor.yaml | ||
|
||
tests: | ||
- it: should create a ServiceMonitor if `controller.metrics.serviceMonitor.enabled` is true | ||
set: | ||
controller.metrics.enabled: true | ||
controller.metrics.serviceMonitor.enabled: true | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: ServiceMonitor | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ingress-nginx-controller | ||
|
||
- it: should create a ServiceMonitor with annotations if `controller.metrics.serviceMonitor.annotations` is set | ||
set: | ||
controller.metrics.enabled: true | ||
controller.metrics.serviceMonitor.enabled: true | ||
controller.metrics.serviceMonitor.annotations: | ||
my-little-annotation: test-value | ||
asserts: | ||
- equal: | ||
path: metadata.annotations | ||
value: | ||
my-little-annotation: test-value |
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