Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Use a test Connection implementation instead of mocking a real one

Abierto
#156 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
9
Forks
5
Merge medio
1 d 9 h
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-ankaios/ank-sdk-python

Todos los issues de eclipse-ankaios/ank-sdk-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.