Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[bug] Local unit tests fail: missing `/etc/hosts` configuration on Linux machines

Aperta
#614 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
docker, nginx, python

Direzione di ricerca

Inizia con il target make runtests e confronta la sua configurazione con la pipeline CI, soprattutto nei punti in cui vengono aggiunte voci a /etc/hosts. Riproduci localmente i malfunzionamenti DNS, quindi verifica che il workflow di test locale esegua la configurazione degli hostname necessaria oppure la spieghi chiaramente, e riesegui gli unit test per confermare che abbiano esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Describe the bug
Unit tests fail with DNS resolution errors when run locally with make runtests. The test suite attempts to connect to dashboard.openwisp.org and api.openwisp.org, but these hostnames are not resolvable on the developer's machine, causing Selenium WebDriver and HTTP requests to fail with net::ERR_NAME_NOT_RESOLVED and [Errno -2] Name or service not known errors.

The services are actually running and accessible (nginx is listening on 127.0.0.1:443), but the hostname resolution is missing from the local /etc/hosts file. The CI pipeline works because it explicitly adds these entries during test setup, but the local make runtests workflow does not.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository and set up the local environment
  2. Run the tests: make runtests
  3. Observe 10 out of 12 tests failing with DNS resolution errors

Expected behavior
All unit tests should pass, or at minimum provide clear guidance on required setup steps (like adding /etc/hosts entries).

Screenshots
N/A

System Information:

  • OS: Fedora 42
  • Docker version: 29.4.0
Lingua principale
Python
Stelle
208
Fork
126
Merge medio
23h 58m
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openwisp/docker-openwisp

Tutte le issue di openwisp/docker-openwisp

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.