Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

218
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda