Skip to content

Commit 3aefbcc

Browse files
committed
[DOP-23743] All hardcoded passwords in this repo are used ONLY for tests
1 parent 2571e64 commit 3aefbcc

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

.env

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ TZ=UTC
33
# ClickHouse
44
CH_HOST=localhost
55
CH_PORT=8123
6-
CH_PORT_CLIENT=9001
76
CH_DATABASE=spark
87
CH_USER=spark
98
CH_PASSWORD=123UsedForTestOnly@!

.github/workflows/tests_clickhouse.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
services:
1717
clickhouse:
18-
image: clickhouse/clickhouse-server
18+
image: clickhouse/clickhouse-server:latest-alpine
1919
env:
2020
TZ: UTC
2121
CLICKHOUSE_DB: spark

src/test/scala/io/github/mtsongithub/doetl/sparkdialectextensions/clickhouse/ClickhouseFixture.scala

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ trait ClickhouseFixture extends BeforeAndAfterEach { self: Suite =>
1111

1212
val jdbcHostname: String = dotenv.get("CH_HOST")
1313
val jdbcPort: String = dotenv.get("CH_PORT")
14-
val jdbcPortClient: String = dotenv.get("CH_PORT_CLIENT")
1514
val database: String = dotenv.get("CH_DATABASE")
1615
val jdbcUser: String = dotenv.get("CH_USER")
1716
val jdbcPassword: String = dotenv.get("CH_PASSWORD")
1817
var tableName: String = _
1918
val jdbcUrl: String = s"jdbc:clickhouse://$jdbcHostname:${jdbcPort}/$database"
2019

21-
val connectionProps = new java.util.Properties()
2220
var connection: Connection = _
2321

2422
override def beforeEach(): Unit = {
2523
super.beforeEach()
2624
tableName = Random.alphanumeric.take(10).mkString
27-
connection = DriverManager.getConnection(jdbcUrl, connectionProps)
25+
connection = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword)
2826
}
2927

3028
def setupTable(tableSchema: String, engine: String = "TinyLog"): Unit = {

0 commit comments

Comments
 (0)