[chores] Improve test suite
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia esaminando tests.snmp.base.TestSNMP e i test esistenti dei backend AirOS e OpenWrt. Verifica la copertura dei metodi OpenWRT e AirOS elencati, quindi valuta l’uso di test locali al package e di snmpsim per il mocking. Il lavoro è completato quando è stato deciso e implementato un approccio per l’organizzazione dei test e per la copertura SNMP mancante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 42
- Fork
- 18
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openwisp/netengine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di openwisp/netengine
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Status: Triaged Type: Enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
canonical/craft-store#448 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue research size:s skill:numerics sub-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SKaiNET-developers/SKaiNET#1372 ·
I maintainer di solito rispondono entro 1 giorno
-
debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/vscode-flake8#601 ·
I maintainer di solito rispondono entro 1 giorno