From 4effa16b124d72b41c5e8b0248886a72a6284a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 6 May 2024 14:09:27 +0200 Subject: [PATCH] chore(influxdb): include more characters in wait for log regex (#2532) * fix(influxdb): include more characters in wait for log regex * chore: use fixed version of influxdb v2 --- modules/influxdb/influxdb.go | 2 +- modules/influxdb/influxdb_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/influxdb/influxdb.go b/modules/influxdb/influxdb.go index 887da08e52..10236296de 100644 --- a/modules/influxdb/influxdb.go +++ b/modules/influxdb/influxdb.go @@ -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") diff --git a/modules/influxdb/influxdb_test.go b/modules/influxdb/influxdb_test.go index f80afc1cd6..8c5094cac6 100644 --- a/modules/influxdb/influxdb_test.go +++ b/modules/influxdb/influxdb_test.go @@ -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"),