Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
How add output detail into test output from a Helm test?

I've created a Helm test but when it succeeds or fails, it only outputs a simple message about whether it succeeded or failed (see below). I would like for it to be able to output custom info about what tests it ran and some info about them. So if it failed, I'd see which things failed specifically. And even if it succeeds, it would show me what things it tested.

NAME: my-app
LAST DEPLOYED: Thu Jan 28 17:45:51 2021
NAMESPACE: default
STATUS: deployed
REVISION: 2
TEST SUITE:     my-app-test
Last Started:   Thu Jan 28 17:46:05 2021
Last Completed: Thu Jan 28 17:46:06 2021
Phase:          Succeeded

I don't see anywhere I can specify this or allow it to add to that output?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As I stated in the comment:

Hello, $ helm test has a parameter --logs where it's description states: "dump the logs from test pods (this runs after all tests are complete, but before any cleanup)".

helm test RELEASE_NAME --logs can be used to produce logs from your scheduled tests:

  • Helm.sh: Docs: Topic: Chart test

An example of how $ helm test works could be following:

  • Create an example Helm Chart:
    • $ helm create raven
  • Go into directory and install the Chart:
    • $ cd raven && helm install raven .
  • After the Chart is deployed run:
    • $ helm test raven

The tests for this example Chart are located in the:

  • ROOT_CHART_DIR/templates/tests/

The file that describes a test (test-connection.yaml) looks like below:

apiVersion: v1
kind: Pod
metadata:
  name: "{{ include "raven.fullname" . }}-test-connection"
  labels:
    {{- include "raven.labels" . | nindent 4 }}
  annotations:
    "helm.sh/hook": test
spec:
  containers:
    - name: wget
      image: busybox
      command: ['wget']
      args: ['{{ include "raven.fullname" . }}:{{ .Values.service.port }}']
  restartPolicy: Never

This tests could be modified to output the specific messages depending on what the tests actually determined.

The output of the last command should be following:

NAME: raven
<-- OMITTED --> 
NOTES:
<-- OMITTED --> 

POD LOGS: raven-test-connection
Connecting to raven:80 (10.8.12.208:80)
saving to 'index.html'
index.html           100% |********************************|   612  0:00:00 ETA
'index.html' saved

As it can be seen above the output of wget command with its args was displayed.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!