Skip to content

Commit

Permalink
chore(influxdb): include more characters in wait for log regex (#2532)
Browse files Browse the repository at this point in the history
* fix(influxdb): include more characters in wait for log regex

* chore: use fixed version of influxdb v2
  • Loading branch information
mdelapenya committed May 6, 2024
1 parent 5e97046 commit 4effa16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/influxdb/influxdb.go
Expand Up @@ -69,7 +69,7 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize
if lastIndex := strings.LastIndex(genericContainerReq.Image, ":"); lastIndex != -1 {
tag := genericContainerReq.Image[lastIndex+1:]
if tag == "latest" || tag[0] == '2' {
genericContainerReq.WaitingFor = wait.ForLog(`Listening log_id=[0-9a-zA-Z_]+ service=tcp-listener transport=http`).AsRegexp()
genericContainerReq.WaitingFor = wait.ForLog(`Listening log_id=[0-9a-zA-Z_~]+ service=tcp-listener transport=http`).AsRegexp()
}
} else {
genericContainerReq.WaitingFor = wait.ForLog("Listening for signals")
Expand Down
2 changes: 1 addition & 1 deletion modules/influxdb/influxdb_test.go
Expand Up @@ -41,7 +41,7 @@ func TestV1Container(t *testing.T) {
func TestV2Container(t *testing.T) {
ctx := context.Background()
influxDbContainer, err := influxdb.RunContainer(ctx,
testcontainers.WithImage("influxdb:latest"),
testcontainers.WithImage("influxdb:2.7.5-alpine"),
influxdb.WithDatabase("foo"),
influxdb.WithUsername("root"),
influxdb.WithPassword("password"),
Expand Down

0 comments on commit 4effa16

Please sign in to comment.