alunduil / alunduil/zfs-replicate

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

Đang mở
#672 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
24
Fork
6
Merge trung bình
3 giờ 11 phút
Pull request đã merge (30 ngày)
49

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
testing
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
76/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.