Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Inconsistent log levels for test names

オープン
#471 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go
領域
cli, testing-qa

調査の方向性

pkg/types/v2/file_existence.go、file_content.go、command.go、licenses.go、metadata.go のロギング箇所から始めます。提供された container-structure-test コマンドを --verbosity info とサンプル設定で実行し、現在の出力を比較します。完了とは、debug 出力を引き続き利用できる状態で、一覧にあるすべてのテスト名が info レベルで一貫して表示されることです。

索引モデルが issue の本文から書いたものです。

説明

Description

Different tests log their name at different log levels:

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
    
主要言語
Go
スター
2.5k
フォーク
213
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GoogleContainerTools/container-structure-test のほかの issue

GoogleContainerTools/container-structure-test の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。