Use a test Connection implementation instead of mocking a real one
まだ誰も着手していません。
評価
調査の方向性
Start by reading the Connection abstract class and the Ankaios tests that currently patch ControlInterfaceConnection.connect or write_request; the issue does not name specific files. Review run_checks.py for how to run unit tests, coverage, and lints. Done means applicable tests use a TestConnection to simulate behavior, with checks passing.
索引モデルが issue の本文から書いたものです。
説明
Description
With the new Command Interface implementation, there is now an abstract class called Connection which is needed by Ankaios to communicate to the cluster. For testing the Ankaios class, the current way is to mock the connection methods. For example:
with patch(
"ankaios_sdk.ControlInterfaceConnection.connect"
) as mock_ci_connect:
...
# or
with patch(
"ankaios_sdk.ControlInterfaceConnection.write_request",
) as mock_write:
...
This makes the tests harder to understand and to properly test.
With the new Connection abstract class, a TestConnection class can be developed and used throughout the tests, with which the functionality can be properly simulated and tested.
Goals
Rewrite the Ankaios tests and any other where it applies with a TestConnection class, as described above.
Final result
Summary
To be filled when the final solution is sketched.
Tasks
- Assign yourself as
assignee; - Implement enhancement;
- Check and fix utests, coverage and lints;
- Create Pull Request and fix possible workflow failures;
- Add the
ready_for_reviewlabel.
- 主要言語
- Python
- スター
- 9
- フォーク
- 5
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-ankaios/ank-sdk-python のほかの issue
-
python-version
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
eclipse-ankaios/ank-sdk-python#99 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
eclipse-ankaios/ank-sdk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
SACGF/variantgrid#2341 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
comp/cli P3 type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NousResearch/hermes-agent#141420 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
CKV_GCP_18 (GKEPublicControlPlane) passes when master_authorized_networks_config is absent, control plane is internet-reachable対応中かも @Varshith-Kali が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bridgecrewio/checkov#7753 ·
メンテナーはふだん 1 日以内に返信