Inconsistent log levels for test names
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- go
- Área
- cli, testing-qa
Línea de trabajo
Comienza con los puntos de logging en pkg/types/v2/file_existence.go, file_content.go, command.go, licenses.go y metadata.go. Ejecuta el comando proporcionado de container-structure-test con --verbosity info y la configuración de ejemplo para comparar la salida actual. Se considera terminado cuando todos los nombres de prueba enumerados sean visibles de forma consistente en el nivel info, mientras la salida de depuración siga disponible.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Different tests log their name at different log levels:
Infolevel logging:Debuglevel logging:- command: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/command.go#L84
- licenses: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/licenses.go#L66
- Metadata: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/metadata.go#L93
If container-structure-test runs with --verbosity info and --output <json, junit> --test-report <outfile>, we can't see all the tests that are being run.
Not knowing what tests will run is a possibility in complex build environments where the configuration for container-structure-tests is generated at test time. Therefore it is helpful for all of this information to be available in a consistent manner without having to
I think it would make sense to make all the tests log their name at info level; this way it doesn't affect anyone was using --verbosity debug, whilst allowing those at --verbosity info to see all the tests being run.
Replication
With the following config.yml:
schemaVersion: "2.0.0"
fileExistenceTests:
- name: "sh existence"
path: "/bin/sh"
metadataTest:
entrypoint: []
Running with the flags info --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml will give us the following results:
-
with
--verbosity info$ container-structure-test test --verbosity info --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml INFO[0000] container-structure-test &{Version:1.19.1 GitVersion: BuildDate:2024-07-22T18:56:16Z GoVersion:go1.22.5 Compiler:gc Platform:linux/amd64} INFO[0000] File Existence Test: sh existence -
with
--verbosity debug:$ container-structure-test test --verbosity debug --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml INFO[0000] container-structure-test &{Version:1.19.1 GitVersion: BuildDate:2024-07-22T18:56:16Z GoVersion:go1.22.5 Compiler:gc Platform:linux/amd64} INFO[0000] File Existence Test: sh existence DEBU[0000] Metadata Test
- 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 144 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
google/go-containerregistry#2491 ·
Los mantenedores suelen responder en 1 día
-
aiac enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
phase:v1 type:harness
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
scttfrdmn/burroughs#1181 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
compiler-explorer/ce-ci#28 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día