File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
packages/cubejs-schema-compiler/test/integration/clickhouse Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,24 @@ export class ClickHouseDbRunner extends BaseDbRunner {
103103 } ;
104104
105105 testQueries = async ( queries , prepareDataSet ) => {
106- if ( ! this . container && ! process . env . TEST_CLICKHOUSE_HOST ) {
107- this . container = await new GenericContainer ( `clickhouse/clickhouse-server:${ this . clickHouseVersion } ` )
108- . withExposedPorts ( this . port ( ) )
109- . start ( ) ;
106+ let host ;
107+ let port ;
108+ if ( process . env . TEST_CLICKHOUSE_HOST ) {
109+ host = process . env . TEST_CLICKHOUSE_HOST ;
110+ port = 8123 ;
111+ } else {
112+ if ( ! this . container ) {
113+ this . container = await new GenericContainer ( `clickhouse/clickhouse-server:${ this . clickHouseVersion } ` )
114+ . withExposedPorts ( this . port ( ) )
115+ . start ( ) ;
116+ }
117+ host = 'localhost' ;
118+ port = this . container . getMappedPort ( 8123 ) ;
110119 }
111120
112121 const clickHouse = new ClickHouse ( {
113- host : 'localhost' ,
114- port : process . env . TEST_CLICKHOUSE_HOST ? 8123 : this . container . getMappedPort ( 8123 ) ,
122+ host,
123+ port,
115124 } ) ;
116125
117126 clickHouse . sessionId = uuidv4 ( ) ; // needed for tests to use temporary tables
You can’t perform that action at this time.
0 commit comments