Make the port optional in `Wait.forHttp`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, node.js, typescript
Línea de trabajo
Start with packages/testcontainers/src/wait-strategies/wait.ts and packages/testcontainers/src/wait-strategies/http-wait-strategy.ts to trace how Wait.forHttp creates the HTTP wait strategy and how exposed ports are available. Check the existing API and tests for Wait.forHttp, then add coverage for defaulting to the first exposed port, fluent .forPort(8081), and the existing Wait.forHttp(path, port) call. Done means all three forms work.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
Wait.forHttp(path, port, options) requires the port, even for the usual case of a container with one exposed port:
new GenericContainer(image)
.withExposedPorts(8080)
.withWaitStrategy(Wait.forHttp("/health", 8080));
The port is repeated, and in a module it has to be kept in step with the exposed port by hand. Because options is the third positional parameter, it cannot be passed without the port.
Expected
- The port is optional and defaults to the first exposed port.
- The port can be set fluently, for example
Wait.forHttp("/health").forPort(8081). Wait.forHttp(path, port)keeps working.
Where
packages/testcontainers/src/wait-strategies/wait.tspackages/testcontainers/src/wait-strategies/http-wait-strategy.ts
Notes
- Java's
Wait.forHttp(String path)takes only the path, uses the container's first exposed port by default, and hasforPort(int)andWait.forHttps(path). - Related: #1507, which is about the
optionsargument (abortOnContainerExit).
Dependencies
- Nothing blocks this. It can start now.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.6k
- Forks
- 274
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 44
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de testcontainers/testcontainers-node
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
testcontainers/testcontainers-node#1539 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
testcontainers/testcontainers-node#1533 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
testcontainers/testcontainers-node#1531 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
testcontainers/testcontainers-node#1529 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
testcontainers/testcontainers-node#1528 ·
Los mantenedores suelen responder en 1 día
Todos los issues de testcontainers/testcontainers-node
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额Posiblemente ocupada @wumingzhinu la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
OpenListTeam/OpenList-Worker#125 ·
Los mantenedores suelen responder en 2 días
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
margelo/react-native-vision-camera#4217 ·
Los mantenedores suelen responder en 4 días