Unable to get Variable value when exporting through envVars:
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, go
- Área
- cli, testing-qa
Línea de trabajo
Empieza reproduciendo el test de command de test.yaml contra la imagen especificada owasp/modsecurity-crs:4.0.0-nginx-alpine-202402261002, centrándote en la entrada envVars y en la salida de command. Traza cómo commandTests pasa las variables de entorno al contenedor; se considera completado cuando PROJECT_MODE es visible en stdout y el test sigue pasando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hello
Variable value is not reflecting in the response when running with CST . I am new for this testing and follow the CST official instruction to check test case against the docker image, but not able to get variable value when running through CST.
- Running the CST as:
container-structure-test test -i owasp/modsecurity-crs:4.0.0-nginx-alpine-202402261002 -c test.yaml
2 . root@kubernetes:~/CST# cat test.yaml
schemaVersion: 2.0.0
commandTests:
- name: "Test"
command: "/bin/sh"
args:- -c
- |
echo "PROJECT_MODE is: ${PROJECT_MODE}"
envVars: - key: "PROJECT_MODE"
value: "yes"
- root@kubernetes:~/CST# container-structure-test test -i owasp/modsecurity-crs:4.0.0-nginx-alpine-202402261002 -c test.yaml
==================================
====== Test file: test.yaml ======
=== RUN: Command Test: Test
--- PASS
duration: 882.440353ms
stdout: PROJECT_MODE is:
PROJECT_MODE is:-
===================================
============= RESULTS =============
Passes: 1
Failures: 0
Duration: 882.440353ms
Total tests: 1
PASS
root@kubernetes:~/CST#
Please check and share steps (may be missing ) to get the variable value (PROJECT_MODE ) while running the CST .
- Lenguaje dominante
- Go
- Estrellas
- 2.5k
- Forks
- 213
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GoogleContainerTools/container-structure-test
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
allstar
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
GoogleContainerTools/container-structure-test#393 · 639 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
GoogleContainerTools/container-structure-test#280 · 1 reacción ·
-
go.mod pins vulnerable docker/containerd modules; two open Dependabot PRs clear most findingsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Windows: structure_test binary missing .exe extension causes "Open With" dialog instead of running testsPosiblemente ocupada @peakschris la tomó hace 145 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Todos los issues de GoogleContainerTools/container-structure-test
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cloudevents/sdk-go#1346 ·
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
kubernetes/cloud-provider-aws#1517 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
agent-butler-finding chore
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jordansmall/spindrift#6221 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 3 días