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

Unable to get Variable value when exporting through envVars:

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, go
領域
cli, testing-qa

調査の方向性

まず、指定されたイメージ owasp/modsecurity-crs:4.0.0-nginx-alpine-202402261002 に対して test.yaml の command テストを再現し、envVars エントリと command の出力に注目します。commandTests が環境変数をコンテナに渡す方法を追跡します。PROJECT_MODE が stdout に表示され、テストが引き続き成功すれば完了です。

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

説明

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.

  1. 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"
  1. 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 .

主要言語
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 を短くまとめたダイジェスト。