Skip to content

Commit

Permalink
feat: add tests and update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
sule26 committed Nov 3, 2024
1 parent 3e6f248 commit 0ff2167
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
should create a AWSPCAIssuer:
1: |
apiVersion: awspca.cert-manager.io/v1beta1
kind: AWSPCAClusterIssuer
metadata:
labels:
app.kubernetes.io/app: cert-manager-issuers
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.6
name: example
spec:
arn: <some-pca-arn>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
should create a AWSPCAClusterIssuer:
1: |
apiVersion: awspca.cert-manager.io/v1beta1
kind: AWSPCAIssuer
metadata:
labels:
app.kubernetes.io/app: cert-manager-issuers
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.6
name: example
spec:
arn: <some-pca-arn>
region: eu-west-1
secretRef:
name: example
namespace: default
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should create one selfsigned clusterissuer:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: cert-manager-issuers
spec:
selfSigned: {}
Expand All @@ -22,7 +22,7 @@ should create two letsencrypt clusterissuers:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: letsencrypt-prod
spec:
acme:
Expand All @@ -31,9 +31,9 @@ should create two letsencrypt clusterissuers:
name: letsencrypt-prod-account-key
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- http01:
ingress:
class: nginx
- http01:
ingress:
class: nginx
2: |
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
Expand All @@ -43,7 +43,7 @@ should create two letsencrypt clusterissuers:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: letsencrypt-staging
spec:
acme:
Expand All @@ -52,9 +52,9 @@ should create two letsencrypt clusterissuers:
name: letsencrypt-staging-account-key
server: https://acme-staging-v02.api.letsencrypt.org/directory
solvers:
- http01:
ingress:
class: nginx
- http01:
ingress:
class: nginx
should match snapshot:
1: |
apiVersion: cert-manager.io/v1
Expand All @@ -65,7 +65,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: cert-manager-issuers
spec:
selfSigned: {}
Expand All @@ -78,7 +78,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: top-level-name-syntax-sugar
spec:
selfSigned: {}
Expand All @@ -93,7 +93,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: top-level-name-and-metadata
spec:
selfSigned: {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should create namespaced vault issuers:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: vault-issuer
namespace: demo-com
spec:
Expand All @@ -26,7 +26,7 @@ should create namespaced vault issuers:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: vault-issuer
namespace: demo-org
spec:
Expand All @@ -45,7 +45,7 @@ should disable issuers:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: active-issuer
spec:
selfSigned: {}
Expand All @@ -59,7 +59,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: cert-manager-issuers
spec:
selfSigned: {}
Expand All @@ -74,7 +74,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: test-with-name-and-annotations
spec:
selfSigned: {}
Expand All @@ -88,7 +88,7 @@ should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
foo: bar
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: test-with-labels-in-metadata
spec:
selfSigned: {}
Expand All @@ -101,7 +101,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "1"
helm.sh/chart: cert-manager-issuers-0.2.5
helm.sh/chart: cert-manager-issuers-0.2.6
name: top-level-name-syntax-sugar
spec:
selfSigned: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
suite: AWSPCAClusterIssuer tests
templates:
- awspcaclusterissuers.yaml
tests:
- it: should create a AWSPCAIssuer
values:
- ../examples/awspcaissuer.yaml
asserts:
- matchSnapshot: {}
9 changes: 9 additions & 0 deletions charts/cert-manager-issuers/tests/awspcaissuers_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
suite: AWSPCAIssuer tests
templates:
- awspcaissuers.yaml
tests:
- it: should create a AWSPCAClusterIssuer
values:
- ../examples/awspcaclusterissuer.yaml
asserts:
- matchSnapshot: {}

0 comments on commit 0ff2167

Please sign in to comment.