Unable to get Variable value when exporting through envVars:
まだ誰も着手していません。
評価
- 難易度
- 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.
- 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 .
- 主要言語
- Go
- スター
- 2.5k
- フォーク
- 213
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GoogleContainerTools/container-structure-test のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
allstar
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
GoogleContainerTools/container-structure-test#393 · コメント 639 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GoogleContainerTools/container-structure-test#280 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
Windows: structure_test binary missing .exe extension causes "Open With" dialog instead of running tests対応中かも @peakschris が 146 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
GoogleContainerTools/container-structure-test の issue をすべて見る
似ている issue
-
Headerless responses block while skipping duplicate status lines対応中かも @mynhe が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
projectdiscovery/rawhttp#554 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
lognorman20/monaco#7428 ·
-
docs(prompts): IF BLOCKED workflow-scope branch says to comment on the issue on jira/local trackersオープンagent-butler-finding bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
jordansmall/spindrift#6238 ·
メンテナーはふだん 1 日以内に返信