@@ -43,7 +43,6 @@ import (
4343 "github.com/ClickHouse/clickhouse-go/v2/lib/driver"
4444 "github.com/ClickHouse/clickhouse-go/v2/lib/proto"
4545 "github.com/docker/docker/api/types/container"
46- "github.com/docker/go-connections/nat"
4746 "github.com/docker/go-units"
4847 "github.com/google/uuid"
4948 "github.com/stretchr/testify/require"
@@ -139,7 +138,7 @@ func CreateClickHouseTestEnvironment(testSet string) (ClickHouseTestEnvironment,
139138 fmt .Printf ("Docker is not running and no clickhouse connections details were provided. Skipping IT tests: %s\n " , err )
140139 os .Exit (0 )
141140 }
142- fmt .Printf ("Using Docker for IT tests\n " )
141+ fmt .Println ("Using Docker for integration tests" )
143142 _ , b , _ , _ := runtime .Caller (0 )
144143 basePath := filepath .Dir (b )
145144 if err != nil {
@@ -166,9 +165,8 @@ func CreateClickHouseTestEnvironment(testSet string) (ClickHouseTestEnvironment,
166165 Name : containerName ,
167166 ExposedPorts : []string {"9000/tcp" , "8123/tcp" , "9440/tcp" , "8443/tcp" },
168167 WaitingFor : wait .ForAll (
169- wait .ForSQL ("9000/tcp" , "clickhouse" , func (host string , port nat.Port ) string {
170- return fmt .Sprintf ("clickhouse://tester:ClickHouse@%s:%s?secure=false" , host , port .Port ())
171- }),
168+ wait .ForListeningPort ("9000/tcp" ),
169+ wait .ForListeningPort ("8123/tcp" ),
172170 ).WithDeadline (time .Second * 120 ),
173171 Mounts : []testcontainers.ContainerMount {
174172 testcontainers .BindMount (path .Join (basePath , "./resources/custom.xml" ), "/etc/clickhouse-server/config.d/custom.xml" ),
@@ -219,6 +217,10 @@ func CreateClickHouseTestEnvironment(testSet string) (ClickHouseTestEnvironment,
219217 Database : GetEnv ("CLICKHOUSE_DATABASE" , getDatabaseName (testSet )),
220218 }
221219 testEnv .setVersion ()
220+
221+ fmt .Printf ("ClickHouse %s ready: Container=%s Host=%s TCP=%d HTTP=%d SSL=%d HTTPS=%d \n " ,
222+ testEnv .Version .String (), testEnv .ContainerID [:12 ], testEnv .Host , testEnv .Port , testEnv .HttpPort , testEnv .SslPort , testEnv .HttpsPort )
223+
222224 return testEnv , nil
223225}
224226
0 commit comments