Use a test Connection implementation instead of mocking a real one
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 9
- Forks
- 5
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-ankaios/ank-sdk-python
-
python-version
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
eclipse-ankaios/ank-sdk-python#99 · 1 comment ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in eclipse-ankaios/ank-sdk-python
Similar issues
-
vis.image() reports "Unsupported number of image channels: 224" for an HxWxC imagePossibly taken @piyush182004 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fossasia/visdom#1997 · 3 comments ·
Maintainers usually reply within 6 days
-
Byse new domainOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Gujal00/ResolveURL#1525 ·
Maintainers usually reply within 1 day
-
Serialisation fails with pydantic 2.14: wrap serialisers pass SerializationInfo as index_keyPossibly taken @hugohills-regnosys claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
finos/rune-python-runtime#45 ·
-
[Bug]: LangGraph Store sync put bypasses namespace validationPossibly taken @ktz03 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#6050 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hummingbot/condor#283 ·
Maintainers usually reply within 1 day