helm: helm test: add lint rule for incorrect helm test hook types
When I purposely supply an incorrect/unsupported test hook, I’d expect to see a subsequent helm test invocation supply an error specific to this situation.
Changing the docs/examples/nginx/templates/service-test.yaml to the following:
apiVersion: v1
kind: Pod
metadata:
name: "{{.Release.Name}}-service-test"
annotations:
"helm.sh/hook": test-pass
spec:
containers:
- name: curl
image: radial/busyboxplus:curl
command: ['curl']
args: [ '{{ template "fullname" .}}:{{default 80 .Values.httpPort}}' ]
restartPolicy: Never
(Only test hooks supported as of this writing are test-success and test-failure, as seen here)
After example chart install:
$ bin/helm test needled-starfish
Error: no tests found
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (10 by maintainers)
@technosophos I changed the title of the ticket to add a lint rule instead of throwing an error. Let’s add this to the release after 2.3.0 cc/ @vdice - let me know if this sounds like a good plan to you.