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

Use a test Connection implementation instead of mocking a real one

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
testing

調査の方向性

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 の本文から書いたものです。

説明

enhancement good first 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_review label.
主要言語
Python
スター
9
フォーク
5
平均マージ
1日 9時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

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

eclipse-ankaios/ank-sdk-python のほかの issue

eclipse-ankaios/ank-sdk-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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