File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
main/java/org/testcontainers/clickhouse
test/java/org/testcontainers/clickhouse Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ public String getJdbcUrl() {
101
101
);
102
102
}
103
103
104
+ public String getHttpUrl () {
105
+ return "http://" + getHost () + ":" + getMappedPort (HTTP_PORT );
106
+ }
107
+
104
108
@ Override
105
109
public String getUsername () {
106
110
return username ;
Original file line number Diff line number Diff line change @@ -56,4 +56,13 @@ public void testNewAuth() throws SQLException {
56
56
assertThat (resultSetInt ).isEqualTo (1 );
57
57
}
58
58
}
59
+
60
+ @ Test
61
+ public void getHttpUrlTest () {
62
+ try (ClickHouseContainer clickhouse = new ClickHouseContainer (ClickhouseTestImages .CLICKHOUSE_24_12_IMAGE )) {
63
+ clickhouse .start ();
64
+ assertThat (clickhouse .getHttpUrl ()).isEqualTo ("http://" + clickhouse .getHost () + ":" + clickhouse .getMappedPort (ClickHouseContainer .HTTP_PORT ));
65
+ }
66
+ }
67
+
59
68
}
You can’t perform that action at this time.
0 commit comments