Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public String getJdbcUrl() {
);
}

public String getHttpUrl() {
return "http://" + getHost() + ":" + getMappedPort(HTTP_PORT);
}

@Override
public String getUsername() {
return username;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@ public void testNewAuth() throws SQLException {
assertThat(resultSetInt).isEqualTo(1);
}
}

@Test
public void getHttpUrlTest() {
try (ClickHouseContainer clickhouse = new ClickHouseContainer(ClickhouseTestImages.CLICKHOUSE_24_12_IMAGE)) {
clickhouse.start();
assertThat(clickhouse.getHttpUrl()).isEqualTo("http://" + clickhouse.getHost() + ":" + clickhouse.getMappedPort(ClickHouseContainer.HTTP_PORT));
}
}

}