rancher-charts/charts/rancher-external-ip-webhook/100.0.2+up1.0.1/tests/issuer_test.yaml

107 lines
2.9 KiB
YAML

suite: Test Issuers
templates:
- issuer.yaml
tests:
- it: should not render issuer if certificates.certManager.enabled = false
set:
certificates.certManager.enabled: false
asserts:
- hasDocuments:
count: 0
template: issuer.yaml
- it: should render issuer if certificates.certManager.enabled = true
set:
certificates.certManager.enabled: true
asserts:
- hasDocuments:
count: 2
template: issuer.yaml
- it: should set issuer apiVersion with default cert-manager
set:
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager >= 1.0.0 using capabilities
capabilities:
apiversions:
- cert-manager.io/v1
set:
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager >= 0.16.0 using capabilities
capabilities:
apiversions:
- cert-manager.io/v1beta1
set:
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1beta1
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager >= 0.11.0 using capabilities
capabilities:
apiversions:
- cert-manager.io/v1alpha2
set:
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1alpha2
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager < 0.11.0 using capabilities
capabilities:
apiversions:
- certmanager.k8s.io/v1alpha1
set:
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: certmanager.k8s.io/v1alpha1
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager >= 1.0.0 using parameter
set:
certificates.certManager.version: 1.0.0
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager >= 0.16.0 using parameter
set:
certificates.certManager.version: 0.16.0
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1beta1
template: issuer.yaml
- it: should set issuer apiVersion with cert-manager >= 0.11.0 using parameter
set:
certificates.certManager.version: 0.11.0
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: cert-manager.io/v1alpha2
template: issuer.yaml
- it: should set letsEncrypt apiVersion with cert-manager < 0.11.0 using parameter
set:
certificates.certManager.version: 0.9.0
certificates.certManager.enabled: true
asserts:
- equal:
path: apiVersion
value: certmanager.k8s.io/v1alpha1
template: issuer.yaml