alunduil / alunduil/zfs-replicate

filesystem.create and filesystem.list have tests of their own

Abierto
#672 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
24
Forks
6
Merge medio
3 h 11 min
PR fusionados (30 d)
49

Descripción

## User story

As a **maintainer of zfs-replicate's test suite**, I want **direct tests for `filesystem.create` and `filesystem.list`**, so that **the two modules that stand between a replication run and the destination pool are not covered only by accident**.

## Why

They are the least covered modules in the tree: `filesystem/create.py` at 42% and `filesystem/list.py` at 57%, and what coverage they have comes from command-line tests passing through. `zfs_test/replicate_test/filesystem_test/` holds only `destroy_test.py`.

The #485 mutation baseline puts a number on it. Of the 154 mutants no test reaches anywhere in `zfs/`, 121 are in these two files: 63 in `list.py`, 58 in `create.py`. Mutation testing can say nothing about them until tests exist, so they are the one place in the baseline where writing tests comes before triaging survivors.

## Acceptance criteria

- [ ] `zfs_test/replicate_test/filesystem_test/create_test.py` and `list_test.py` exist, following the conventions in `docs/reference/testing.md`.
- [ ] Tests assert the argv each builder produces, and cover the error path each function raises on a non-zero return.
- [ ] `poetry run mutmut run --max-children 1 'zfs.replicate.filesystem.*'` reports no unreached mutant, and any survivor left is noted as an equivalent mutant.

## Out of scope

- Changing either module's behaviour.
- The remaining 20 survivors in `filesystem/destroy.py`, which already has a test module; they belong with the leaf-module sweep.

## Notes

- Reproduce with `poetry install --with mutation` then `poetry run mutmut run --max-children 1`. Serial matters: the parallel runner mis-attributes verdicts on this suite.
- Follow-up to #485.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Read docs/reference/testing.md and the existing zfs_test/replicate_test/filesystem_test/destroy_test.py first, then inspect filesystem/create.py and filesystem/list.py. Add create_test.py and list_test.py covering each builder's argv and non-zero return error path. Run the focused tests and then poetry run mutmut run --max-children 1 'zfs.replicate.filesystem.*'; done means no unreached mutants, with any equivalent survivor noted.

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

Evaluación

Stack tecnológico
python
Área
testing
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
76/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.