feat(common): Release common library 3.7.1 (#383)

Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
Bernd Schorgers 2025-02-11 13:23:27 +01:00 committed by GitHub
parent c94a28baa3
commit 433f6d132b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
146 changed files with 232 additions and 222 deletions

View file

@ -0,0 +1,70 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: rawResource values
templates:
- common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set:
rawResources:
endpoint:
apiVersion: v1
kind: Endpoint
spec:
subsets:
- addresses:
- ip: 127.0.0.1
ports:
- name: "{{ .Release.Name }}"
port: 443
protocol: TCP
tests:
- it: raw resources can be configured
documentSelector: &EndpointSelector
path: $[?(@.kind == "Endpoint")].metadata.name
value: RELEASE-NAME-endpoint
asserts:
- equal:
path: subsets[0].addresses[0].ip
value: 127.0.0.1
- it: nameOverride can be configured
set:
rawResources.endpoint:
nameOverride: test
documentSelector:
path: $[?(@.kind == "Endpoint")].metadata.name
value: RELEASE-NAME-test
asserts:
- equal:
path: metadata.name
value: RELEASE-NAME-test
- it: nameOverride with template should pass
set:
rawResources.endpoint:
nameOverride: "{{ .Release.Name }}"
documentSelector:
path: $[?(@.kind == "Endpoint")].metadata.name
value: RELEASE-NAME
asserts:
- equal:
path: metadata.name
value: RELEASE-NAME
- it: spec can render Helm template
set:
rawResources.endpoint:
spec:
subsets:
- addresses:
- ip: 127.0.0.1
ports:
- name: "{{ .Release.Name }}"
port: 443
protocol: TCP
documentSelector: *EndpointSelector
asserts:
- equal:
path: subsets[0].ports[0].name
value: RELEASE-NAME