Improve early-detection of empty template 07/114807/3
authorKonrad Bańka <k.banka@samsung.com>
Thu, 12 Nov 2020 08:13:37 +0000 (09:13 +0100)
committerKonrad Bańka <k.banka@samsung.com>
Wed, 18 Nov 2020 13:16:29 +0000 (14:16 +0100)
commit8c86f56defd56c5ea02eb6952ba4b852599100d5
tree22914b5a493ffdff2f540354e38019869976cbcb
parent0c352ef0d74d4b51a0fce5123b34a6753e8ab6a4
Improve early-detection of empty template

Previous empty template detection pattern matched only against templates
resolved to empty-or-whitespace-only files. This change makes it handle
other case of empty yaml correctly, namely, yaml containing comments
only.

Issue-ID: MULTICLOUD-1252
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Change-Id: I9132e167ec607c8a4a4ca5584141ed043c6ddd4f
src/k8splugin/internal/helm/helm.go
src/k8splugin/internal/helm/helm_test.go
src/k8splugin/mock_files/mock_charts/testchart3/Chart.yaml [new file with mode: 0644]
src/k8splugin/mock_files/mock_charts/testchart3/templates/always-empty.yaml [new file with mode: 0644]
src/k8splugin/mock_files/mock_charts/testchart3/templates/multi.yaml [new file with mode: 0644]
src/k8splugin/mock_files/mock_charts/testchart3/templates/only-comment.yaml [new file with mode: 0644]
src/k8splugin/mock_files/mock_charts/testchart3/values.yaml [new file with mode: 0644]