Take network aliases with the network, and allow more than one network
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, node.js, typescript
Direzione di ricerca
Start with withNetwork, withNetworkMode, withNetworkAliases, and startContainer in packages/testcontainers/src/generic-container/generic-container.ts, then read getIpAddress and getNetworkId in packages/testcontainers/src/generic-container/started-generic-container.ts. Trace how network settings reach container startup and how the started-container interface and forwarder expose network details. Done means multiple networks can have aliases, aliases without a network fail at startup, and lookups accept StartedNetwork or a name with a clear error for unattached networks.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
Putting a container on a network with an alias takes two calls that only work together:
new GenericContainer(image).withNetwork(network).withNetworkAliases("db");
withNetworkAliaseswithout a network does nothing, silently. The aliases are only applied when a network mode is also set (from reading the code).withNetworkandwithNetworkModewrite the same field, so the later call wins without a warning.- A container can be given one network. There is no way to attach a second.
Reading network details back needs the network's name as a string:
container.getIpAddress(network.getName());
An unknown name throws TypeError: Cannot read properties of undefined from getIpAddress and getNetworkId (from reading the code).
Expected
- Aliases can be given with the network:
withNetwork(network, { aliases: ["db"] }). Calling it again attaches another network. withNetworkAliaseswithout a network throws when the container starts.getIpAddressandgetNetworkIdaccept aStartedNetworkas well as a name, and throw a clear error for a network the container is not on.
Where
withNetwork,withNetworkMode,withNetworkAliasesandstartContainerinpackages/testcontainers/src/generic-container/generic-container.tsgetIpAddressandgetNetworkIdinpackages/testcontainers/src/generic-container/started-generic-container.ts
Notes
- Go takes the aliases with the network:
network.WithNetwork(aliases, nw), and its request holds a list of networks with aliases per network. Java has the same two separate calls as this library. - Related: #1535 (network options).
Dependencies
- Nothing blocks this. It can start now.
- Changes
StartedTestContainer, which today means the interface,StartedGenericContainerand the forwarder onAbstractStartedContainer. Several other issues do the same. The edits do not overlap, so they can go in parallel.
- Lingua principale
- TypeScript
- Stelle
- 2.6k
- Fork
- 274
- Merge medio
- 1g 14h
- PR unite (30g)
- 44
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun 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 testcontainers/testcontainers-node
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
testcontainers/testcontainers-node#1539 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
testcontainers/testcontainers-node#1533 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
testcontainers/testcontainers-node#1531 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
testcontainers/testcontainers-node#1529 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
testcontainers/testcontainers-node#1528 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di testcontainers/testcontainers-node
Issue simili
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
redhat-developer/rhdh-plugin-export-overlays#4391 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Luligu/matterbridge#655 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
software-mansion/argent#1457 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
schmayterling/hibi#245 ·
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
linagora/twake-contacts-frontend#241 ·
I maintainer di solito rispondono entro 1 giorno