[chores] Improve test suite
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
まず tests.snmp.base.TestSNMP と既存の AirOS および OpenWrt バックエンドテストを確認します。記載されている OpenWRT および AirOS のメソッドのカバレッジを確認し、その後、モックに package-local テストと snmpsim を使用することを検討します。テストの構成と不足している SNMP カバレッジについて、方針が決定され、実装されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 42
- フォーク
- 18
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openwisp/netengine のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
openwisp/netengine の issue をすべて見る
似ている issue
-
bug Size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oposs/repo-infra#93 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
Graphify-Labs/graphify#4546 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
521xueweihan/HelloGitHub#4025 ·