testcontainers / testcontainers/testcontainers-java

[Enhancement]: setCommand should allow space escaping

オープン
#9,530 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

type/enhancement
主要言語
Java
スター
8.7k
フォーク
1.9k
平均マージ
2日 17時間
マージ済み PR(30日)
9

説明

Module

Core

Proposal

Currently, GenericContainer.setCommand(String) do a command.split(" ").
This doesn't allow escaping the space. It can be an issue for command lines like postgres -c max_connections=100 -c default_transaction_isolation=repeatable read

The alternative method setCommand(String... commandParts) is not always available, for example, when using testcontainers through quarkus dev-service which doesn't expose a way to set command through array/list of parameters.

As command.split() take a regexp, changing the implementation to command.split("[^\\]? ") should allow user to write postgres -c max_connections=100 -c default_transaction_isolation=repeatable\ read and get correct interpretation.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

GenericContainer.setCommand(String) から始めます。ここでは issue で command.split(" ") が報告されているため、提案にあるエスケープされたスペースの例を再現してください。通常のスペースで区切られた引数が引き続き機能しつつ、エスケープされたスペースが 1 つのコマンド引数内に残れば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, java
領域
testing-qa
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。