[chores] Improve test suite
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
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách xem xét tests.snmp.base.TestSNMP và các bài kiểm thử backend AirOS và OpenWrt hiện có. Kiểm tra mức độ bao phủ của các phương thức OpenWRT và AirOS được liệt kê, sau đó cân nhắc các bài kiểm thử cục bộ trong package và snmpsim để mocking. Công việc được xem là hoàn tất khi đã quyết định và triển khai một cách tiếp cận cho việc tổ chức kiểm thử và phần bao phủ SNMP còn thiếu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow up to #48 / #46
- Configure nose to automatically find test files. This will eliminate the need of importing modules in
__init__.py. Prefixing test file names withtest_should do most of the work, (Done in #59) - Add tests for missing coverage. Most of the missing coverage can be easily tested. (To be done in #62)
- Add
.coveragercfile as done here: https://github.com/openwisp/openwisp-controller/blob/master/.coveragerc (Done in #59) - Use logger instead of print statements. Check if there's a difference between logger module of Python 2 and Python 3. If there is, delegate this to https://github.com/openwisp/netengine/issues/49 (Done in #59)
Open for discussion
- Consider moving some tests inside the package like we do for other modules. This enables users to run or extend tests.
- Currently most parts of
netengine.backends.snmp.SNMPare not tested directly intests.snmp.base.TestSNMPbut they are tested in tests for AirOS and OpenWrt backend. Do we want to keep it this way or find a way to make tests more modular? - There is lack of proper tests for following methods of
netengine.backends.snmp.OpenWRT:get_interfacesinterfaces_MACinterfaces_speedinterfaces_stateinterfaces_bytesinterfaces_typeinterface_addr_and_mask
- The above point also applies on
netengine.backends.snmp.AirOS - Using snmpsim for mocking an SNMP device
- Ngôn ngữ chính
- Python
- Star
- 42
- Fork
- 18
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 openwisp/netengine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Verify AirOS CPU count sourceĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/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 openwisp/netengine
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mohitmishra786/readprism#322 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
API-key credentials accept a blank key: empty via the API, spaces-only via the builder's Add API key dialogCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Significant-Gravitas/AutoGPT#15727 ·
Maintainer thường phản hồi trong vòng 1 ngày