mirror of https://git.rancher.io/charts
33 lines
993 B
YAML
33 lines
993 B
YAML
suite: Test Admission Registration
|
|
templates:
|
|
- admissionregistration.yaml
|
|
tests:
|
|
- it: should render Admission Registration
|
|
asserts:
|
|
- equal:
|
|
path: apiVersion
|
|
value: admissionregistration.k8s.io/v1beta1
|
|
- it: should render Admission Registration annotation and not caBundle if certificates.certManager.enabled = true
|
|
release:
|
|
name: rancher-externalip-webhook
|
|
namespace: test
|
|
set:
|
|
certificates.certManager.enabled: true
|
|
asserts:
|
|
- equal:
|
|
path: metadata.annotations
|
|
value:
|
|
cert-manager.io/inject-ca-from: test/rancher-externalip-webhook-server-cert
|
|
- isNull:
|
|
path: webhooks[0].clientConfig.caBundle
|
|
- it: should render Admission Registration caBundle and not annotation if certificates.certManager.enabled = false
|
|
set:
|
|
certificates.caBundle: test
|
|
certificates.certManager.enabled: false
|
|
asserts:
|
|
- equal:
|
|
path: webhooks[0].clientConfig.caBundle
|
|
value: test
|
|
- isNull:
|
|
path: metadata.annotations
|