1
0
mirror of https://github.com/helm/chart-testing.git synced 2026-02-05 18:45:18 +01:00

2 Commits

Author SHA1 Message Date
Carlos Tadeu Panato Junior
68f3fffe62 Upgrade go1.19, helm update and add golangci-lint job (#460)
* upgrade to go1.19

Signed-off-by: cpanato <ctadeu@gmail.com>

* add golangci-lint

Signed-off-by: cpanato <ctadeu@gmail.com>

* fix lints and Replace github.com/pkg/errors dependency with native error wrapping

Signed-off-by: cpanato <ctadeu@gmail.com>

* update install kind cluster

Signed-off-by: cpanato <ctadeu@gmail.com>

* update tests

Signed-off-by: cpanato <ctadeu@gmail.com>

* use errors.new

Signed-off-by: cpanato <ctadeu@gmail.com>

Signed-off-by: cpanato <ctadeu@gmail.com>
2022-09-16 15:59:15 +02:00
Torsten Walter
e4d7b78183 Support execution of additional commands during ct lint (#283)
* support execution of additional commands for lint

Given that helm unittest is installed locally or mounted into the chart
testing container one could use this to run helm unittest for each
chart.

```
additional-commands:
 - helm unittest --helm3 -f tests/*.yaml {{ .Path }}
```

The command is treated as a go template. Like this it's possible to get
the path to the chart as in the example. It would also be open for
further extension if needed.

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* Use sh to execute command

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>

* rename function to NewCmdTemplateExecutor

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* add error handling

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* add documentation

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* use go-shellwords to split rendered command

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* Update pkg/tool/cmdexecutor.go

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>

* add unit tests

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>
2020-10-20 17:10:56 -04:00