Make the port optional in `Wait.forHttp`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 82/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 274
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 44
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
testcontainers/testcontainers-node#1529 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 1 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
bug engine
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
frostney/GocciaScript#1746 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
agilepathway/label-checker#739 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
CopilotKit/OpenBot#800 ·
メンテナーはふだん 1 日以内に返信
-
Endpoint links in the tag operations list are below the 24px target size対応中かも @AdzerKI が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
ehmpathy/rhachet-roles-bhuild#471 ·
メンテナーはふだん 1 日以内に返信