rancher-charts/charts/rancher-external-ip-webhook/100.0.1+up1.0.1/tests/servicemonitor_test.yaml

21 lines
565 B
YAML

suite: Test Service Monitors
templates:
- servicemonitor.yaml
tests:
- it: should not render Service Monitor if metrics.enabled = false or metrics.prometheusExport = false
set:
metrics.enabled: false
metrics.prometheusExport: false
asserts:
- hasDocuments:
count: 0
template: servicemonitor.yaml
- it: should render Service Account if metrics.enabled = true and metrics.authProxy.enabled = true
set:
metrics.enabled: true
metrics.prometheusExport: true
asserts:
- hasDocuments:
count: 1
template: servicemonitor.yaml