From d2e63a56a78e94d96a546f1e960352f2c6f331a6 Mon Sep 17 00:00:00 2001 From: Henry Whitaker Date: Tue, 9 Apr 2024 19:39:53 +0100 Subject: [PATCH] fix: tests failing for class name --- chart/Chart.yaml | 2 +- chart/tests/ingress_test.yaml | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index a68d3f0..f6b087f 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -13,7 +13,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.3.7 +version: 1.3.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. diff --git a/chart/tests/ingress_test.yaml b/chart/tests/ingress_test.yaml index dbd9940..8d6bc1c 100644 --- a/chart/tests/ingress_test.yaml +++ b/chart/tests/ingress_test.yaml @@ -31,9 +31,17 @@ tests: - isSubset: path: .metadata.annotations content: - kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" + - it: adds default ingress class when not set + set: + ingress: + enabled: true + asserts: + - equal: + path: .spec.ingressClassName + value: nginx + - it: adds annotations when set set: ingress.enabled: true @@ -45,20 +53,14 @@ tests: content: bongo: bingo - - it: doesn't add ingressClassName by defaut - set: - ingress.enabled: true - asserts: - - notExists: - path: .spec.ingressClassName - - it: adds ingressClassName when set set: - ingress.enabled: true - ingress.className: nginx + ingress: + enabled: true + className: bongo asserts: - exists: path: .spec.ingressClassName - equal: path: .spec.ingressClassName - value: nginx + value: bongo