mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release library 3.7.0 (#377)
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com> Co-authored-by: Patrick Collins <Patricol@users.noreply.github.com> Co-authored-by: Patrick Collins <patrick.collins@gainbridge.io> Co-authored-by: Lawrence Gil <larrywtf609@gmail.com> Co-authored-by: solidDoWant <fred.heinecke@yahoo.com>
This commit is contained in:
parent
aee0d999ba
commit
8b33237e27
32 changed files with 793 additions and 655 deletions
|
@ -13,18 +13,14 @@ set:
|
|||
spec:
|
||||
test: test
|
||||
tests:
|
||||
- it: default metadata should pass
|
||||
- it: default metadata should be present
|
||||
documentSelector: &EndpointSelector
|
||||
path: $[?(@.kind == "Endpoint")].metadata.name
|
||||
value: RELEASE-NAME-config
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
notExists:
|
||||
- notExists:
|
||||
path: metadata.annotations
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
|
@ -32,7 +28,7 @@ tests:
|
|||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: common-test-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
- it: custom metadata can be configured
|
||||
set:
|
||||
rawResources:
|
||||
config:
|
||||
|
@ -40,19 +36,13 @@ tests:
|
|||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
documentSelector: *EndpointSelector
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
test_annotation: test
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
|
@ -61,7 +51,7 @@ tests:
|
|||
helm.sh/chart: common-test-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
- it: global metadata can be configured with local overrides
|
||||
set:
|
||||
global:
|
||||
labels:
|
||||
|
@ -74,20 +64,14 @@ tests:
|
|||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
documentSelector: *EndpointSelector
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
global_annotation: test
|
||||
test_annotation: test
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
|
|
|
@ -19,28 +19,24 @@ set:
|
|||
port: 443
|
||||
protocol: TCP
|
||||
tests:
|
||||
- it: default should pass
|
||||
- it: raw resources can be configured
|
||||
documentSelector: &EndpointSelector
|
||||
path: $[?(@.kind == "Endpoint")].metadata.name
|
||||
value: RELEASE-NAME-endpoint
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: subsets[0].addresses[0].ip
|
||||
value: 127.0.0.1
|
||||
|
||||
- it: nameOverride should pass
|
||||
- it: nameOverride can be configured
|
||||
set:
|
||||
rawResources.endpoint:
|
||||
nameOverride: test
|
||||
documentSelector:
|
||||
path: $[?(@.kind == "Endpoint")].metadata.name
|
||||
value: RELEASE-NAME-test
|
||||
asserts:
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-test
|
||||
|
||||
|
@ -48,16 +44,15 @@ tests:
|
|||
set:
|
||||
rawResources.endpoint:
|
||||
nameOverride: "{{ .Release.Name }}"
|
||||
documentSelector:
|
||||
path: $[?(@.kind == "Endpoint")].metadata.name
|
||||
value: RELEASE-NAME
|
||||
asserts:
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
|
||||
- it: spec with template should pass
|
||||
- it: spec can render Helm template
|
||||
set:
|
||||
rawResources.endpoint:
|
||||
spec:
|
||||
|
@ -68,11 +63,8 @@ tests:
|
|||
- name: "{{ .Release.Name }}"
|
||||
port: 443
|
||||
protocol: TCP
|
||||
documentSelector: *EndpointSelector
|
||||
asserts:
|
||||
- documentIndex: &rawResourceDocument 1
|
||||
isKind:
|
||||
of: Endpoint
|
||||
- documentIndex: *rawResourceDocument
|
||||
equal:
|
||||
- equal:
|
||||
path: subsets[0].ports[0].name
|
||||
value: RELEASE-NAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue