AssertionError message to nagios output
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with the pytest command using the --nagios option and compare its output with the same command without --nagios, using the shown AssertionError case. Trace how the assertion message is handled for the Nagios result and verify that the failing test's message appears in the final Nagios output while the pass/fail summary remains intact.
索引モデルが issue の本文から書いたものです。
説明
Hello I have a simple test where I print the filename if the file exists.
/home/nagios/monitoring-env/bin/pytest -v -s -qq --nagios --tb long --inputfile=test.txt /usr/local/ncpa/plugins/test_myinfra.py
input file: test.txt
File Found: '/usr/local/ncpa/plugins/test.txt'
TESTINFRA OK - 1 passed, 0 failed, 0 skipped in 0.06 seconds
In nagios I do see the print statement: File Found: '/usr/local/ncpa/plugins/test.txt'
I have a simple assert in my code;
assert len(list_match)==1 , " File NOT Found:" + str(list_match).strip('[]')
If i run the test without nagios I do see the AssertionError
/home/nagios/monitoring-env/bin/pytest -v -s --inputfile=test.txt /usr/local/ncpa/plugins/test_myinfra.py
E AssertionError: File NOT Found: '/usr/local/ncpa/plugins/test.txt'
TESTINFRA CRITICAL - 0 passed, 1 failed, 0 skipped in 0.10 seconds
How can I have the AssertionError message displayed in Nagios when running the command below?
/home/nagios/monitoring-env/bin/pytest -v -s -qq --nagios --tb long --inputfile=test.txt /usr/local/ncpa/plugins/test_myinfra.py
TESTINFRA CRITICAL - 0 passed, 1 failed, 0 skipped in 0.06 seconds
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 359
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-testinfra のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
pytest-dev/pytest-testinfra#815 ·
-
service is_enabled does not work with exit code 4対応中かも @pfuntner が 579 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
pytest-dev/pytest-testinfra#801 · コメント 1 件 ·
-
Chroot backendオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
pytest-dev/pytest-testinfra#789 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
pytest-dev/pytest-testinfra#788 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
pytest-dev/pytest-testinfra#786 ·
pytest-dev/pytest-testinfra の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
unionai-oss/pandera#2640 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JdeRobot/RoboticsInfrastructure#843 ·
メンテナーはふだん 1 日以内に返信
-
automated endpoint-dead needs-curation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
almanac-data/climate-almanac#122 ·
メンテナーはふだん 1 日以内に返信
-
area:harness enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
evarness-ai/iris-harness#420 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
suitenumerique/find#206 ·
メンテナーはふだん 2 日以内に返信