Use a test Connection implementation instead of mocking a real one
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 9
- Fork
- 5
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-ankaios/ank-sdk-python
-
Reduce number of MacOS jobsĐang mởCI/CD enhancement github_actions good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Update Python support to 3.14Đang mởpython-version
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
eclipse-ankaios/ank-sdk-python#99 · 1 bình luận ·
-
Document the release processĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của eclipse-ankaios/ank-sdk-python
Issue tương tự
-
idxmax/idxmin raise ValueError when a single partition is all-NACó thể đã có người làm @Jason10191019999 đã nhận hôm nay. Đang mởneeds triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Old versions of datamodelsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
[BUG]: Windows GUI package of v1.17.0-rc3 has no GTK DLLsCó thể đã có người làm @andrut-ds đã nhận hôm nay. Đang mởbug CI/CD Pactus-GUI Windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pactus-project/pactus#2428 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DiskDataset.reshard() can hang with a zero or negative shard sizeCó thể đã có người làm @Programmer-Develops đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 19 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
GNS3/gns3-server#3017 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày