Skip to content

Commit 9d29b6a

Browse files
issue-497: null value
Signed-off-by: ivan katliarchuk <[email protected]>
1 parent 2934c5d commit 9d29b6a

File tree

6 files changed

+44
-2
lines changed

6 files changed

+44
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
DOCKER_HELM_UNITITEST_IMAGE := helmunittest/helm-unittest:3.16.1-0.6.3
77
LOCAL_UNIT_TEST := $(HOME)/source/self/go-workshop/helm-unittest-tmp/untt
88

9-
ISSUE := issue-471
9+
ISSUE := issue-497
1010

1111
SUPPORTED := chart \
1212
issue-156 \
@@ -35,7 +35,8 @@ SUPPORTED := chart \
3535
issue-x \
3636
issue-351 \
3737
issue-457 \
38-
issue-471
38+
issue-471 \
39+
issue-497
3940

4041
FILTER_FOLDER := $(filter $(folder),$(SUPPORTED))
4142

issue-497/Chart.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v2
2+
description: An example chart with customized subchart
3+
name: with-subchart
4+
version: 0.1.0
5+
issueLink: https://github.com/helm-unittest/helm-unittest/issues/497
6+
supportedLinks:
7+
- https://github.com/helm-unittest/helm-unittest/issues/497

issue-497/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# - matchSnapshot: {}

issue-497/templates/simple.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- if .Values.node.enabled }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: {{ .Release.Name }}-{{ .Values.node.name }}-http
6+
{{- end}}
7+

issue-497/tests/simple_test.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
suite: test wardend service
2+
templates:
3+
- service.yaml
4+
tests:
5+
- it: "should create Service if node is enabled"
6+
set:
7+
node:
8+
enabled: true
9+
asserts:
10+
- hasDocuments:
11+
count: 1
12+
- isKind:
13+
of: Service
14+
- isMatch:
15+
path: metadata.name
16+
pattern: ".*-http"

issue-497/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
hosts:
2+
- chart-example.local
3+
- chart-example.remote
4+
5+
hostsMap:
6+
- name: value0
7+
attribute: attribute0
8+
- name: value1
9+
attribute: attribute1

0 commit comments

Comments
 (0)