testcontainers / testcontainers/testcontainers-python
Bug: `K3SContainer` does not support other connection modes (in `get_container_host_ip`)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 2.3k
- Fork
- 386
- Merge medio
- 4h 40m
- PR unite (30g)
- 1
Descrizione
Describe the bug
K3SContainer calls get_container_host_ip in its __init__ method here and here before the container is started, causing it to fail with an AssertionError here.
To Reproduce
from testcontainers.k3s import K3SContainer
with K3SContainer() as k3s:
print("gonna throw an error before I even get here :(")
Runtime environment
I'm on an ARM Mac and this is in Python 3.12, but that shouldn't make a difference.
Guida per i contributori
Apri 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.
Direzione di ricerca
Iniziare da modules/k3s/testcontainers/k3s/init.py, nelle chiamate di K3SContainer.init a get_container_host_ip, quindi esaminare core/testcontainers/core/container.py intorno all’asserzione. Riprodurre l’esempio di context manager K3SContainer fornito e verificare che l’inizializzazione non fallisca più prima dell’avvio e che siano supportate le altre modalità di connessione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, python
- Ambito
- devops
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100