Skip to content

Commit 7c98b91

Browse files
feat(issue-499): resolved
Signed-off-by: ivan katliarchuk <[email protected]>
1 parent a60c805 commit 7c98b91

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SUPPORTED := chart \
3939
issue-499 \
4040
issue-504
4141

42-
ISSUE := issue-504
42+
ISSUE := issue-499
4343

4444
FILTER_FOLDER := $(filter $(folder),$(SUPPORTED))
4545

@@ -121,7 +121,7 @@ unit-test-plugin: ## Execute Unit tests locally with plugin --debugPlugin
121121

122122
unit-test-local: ## Execute Unit tests with locally build (--debugPlugin)
123123
$(info Running unit tests for $(ISSUE)...)
124-
@$(LOCAL_UNIT_TEST) -f 'tests/*.yaml' $(ISSUE)
124+
@$(LOCAL_UNIT_TEST) -f 'tests/*.yaml' --debugPlugin $(ISSUE)
125125

126126
unit-test-current: ## Execute Unit tests with locally build (--debugPlugin)
127127
@$(LOCAL_UNIT_TEST) -f 'tests/*.yaml' --coverage $(ISSUE)

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,16 @@
4444
[governance.link-checker.status]: https://github.com/ik-workshop/helm-unittests-issues/actions/workflows/governance.links-checker.yml
4545

4646
`runAsNonRoot` is set to `false` but `runAsUser` is not set to `0`
47+
48+
# - failedTemplate:
49+
# errorMessage: "`runAsNonRoot` is set to `true` but `runAsUser` is set to `0` (root)"
50+
# - failedTemplate:
51+
# errorMessage: "\\\(root\\\)"
52+
# - failedTemplate:
53+
# errorPattern: |-
54+
# \\(root\\)
55+
56+
- failedTemplate:
57+
errorPattern: "`runAsNonRoot` is set to `true` but `runAsUser` is set to `0` (root)"
58+
- failedTemplate:
59+
errorMessage: "`runAsNonRoot` is set to `true` but `runAsUser` is set to `0` (root)"

issue-499/tests/empy_test.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
suite: Test empty template
2+
templates:
3+
- validation.tpl
4+
tests:
5+
- it: should fail when No failed document
6+
asserts:
7+
- failedTemplate:
8+
errorPattern: |-
9+
`runAsNonRoot` is set to `true` but `runAsUser` is set to `0` \(root\)
10+
- failedTemplate:
11+
errorMessage: "`runAsNonRoot` is set to `true` but `runAsUser` is set to `0` (root)"

0 commit comments

Comments
 (0)