From 1892c3576f9b937ace47a21b5ae7322714853257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20Echterh=C3=B6lter?= Date: Sun, 9 Feb 2025 19:48:12 +0100 Subject: [PATCH] fix(example-content): bump chart version to 0.113.3 and update snapshot tests --- charts/example-content/Chart.yaml | 2 +- .../__snapshot__/snapshot_test.yaml.snap | 111 ++++++++++++++++++ .../example-content/tests/snapshot_test.yaml | 7 ++ 3 files changed, 119 insertions(+), 1 deletion(-) diff --git a/charts/example-content/Chart.yaml b/charts/example-content/Chart.yaml index 7fa8d9029..42f4c6f46 100644 --- a/charts/example-content/Chart.yaml +++ b/charts/example-content/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "0.148.0" description: Helm Chart for the openmfp Portal name: example-content -version: 0.113.2 +version: 0.113.3 dependencies: - name: common version: 0.2.7 diff --git a/charts/example-content/tests/__snapshot__/snapshot_test.yaml.snap b/charts/example-content/tests/__snapshot__/snapshot_test.yaml.snap index d204abedb..975126ee8 100644 --- a/charts/example-content/tests/__snapshot__/snapshot_test.yaml.snap +++ b/charts/example-content/tests/__snapshot__/snapshot_test.yaml.snap @@ -108,3 +108,114 @@ matches the snapshot: selector: app: RELEASE-NAME-example-content type: ClusterIP +matches the snapshot (internalUrl): + 1: | + apiVersion: core.openmfp.io/v1alpha1 + kind: ContentConfiguration + metadata: + name: RELEASE-NAME-example-content-ui + namespace: NAMESPACE + spec: + remoteConfiguration: + contentType: json + internalUrl: http://example-content:8000/ui/assets/config.json + url: http://localhost:8000/ui/example-content/ui/assets/config.json + 2: | + apiVersion: core.openmfp.io/v1alpha1 + kind: ContentConfiguration + metadata: + name: RELEASE-NAME-example-content-wc + namespace: NAMESPACE + spec: + remoteConfiguration: + contentType: json + url: http://localhost:8000/ui/example-content/wc/assets/config.json + 3: | + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: RELEASE-NAME-example-content + name: RELEASE-NAME-example-content + spec: + revisionHistoryLimit: 3 + selector: + matchLabels: + app: RELEASE-NAME-example-content + strategy: + rollingUpdate: + maxSurge: 5 + maxUnavailable: 0 + template: + metadata: + labels: + app: RELEASE-NAME-example-content + spec: + containers: + - env: + - name: PORT + value: "8080" + image: ghcr.io/openmfp/example-content:1.0.0 + imagePullPolicy: Always + name: RELEASE-NAME-example-content + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 8080 + name: metrics + protocol: TCP + - containerPort: 8081 + name: health-port + protocol: TCP + resources: + limits: + cpu: 100m + memory: 512Mi + requests: + cpu: 40m + memory: 50Mi + securityContext: + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /var/cache/nginx + name: tmp-volume + readOnly: false + - mountPath: /var/run + name: run-volume + readOnly: false + securityContext: + fsGroup: 2000 + runAsGroup: 3000 + runAsUser: 1000 + serviceAccountName: RELEASE-NAME-example-content + volumes: + - emptyDir: {} + name: tmp-volume + - emptyDir: {} + name: run-volume + 4: | + apiVersion: v1 + imagePullSecrets: + - name: github + kind: ServiceAccount + metadata: + name: RELEASE-NAME-example-content + namespace: NAMESPACE + 5: | + apiVersion: v1 + kind: Service + metadata: + name: RELEASE-NAME-example-content + namespace: NAMESPACE + spec: + ports: + - name: http + port: 8080 + protocol: TCP + selector: + app: RELEASE-NAME-example-content + type: ClusterIP diff --git a/charts/example-content/tests/snapshot_test.yaml b/charts/example-content/tests/snapshot_test.yaml index bf0f9839a..51db865ea 100644 --- a/charts/example-content/tests/snapshot_test.yaml +++ b/charts/example-content/tests/snapshot_test.yaml @@ -5,5 +5,12 @@ tests: - it: matches the snapshot values: - ../test-values.yaml + asserts: + - matchSnapshot: {} + - it: matches the snapshot (internalUrl) + values: + - ../test-values.yaml + set: + contentConfigurations.ui.internalUrl: http://example-content:8000/ui/assets/config.json asserts: - matchSnapshot: {} \ No newline at end of file