Skip to content

Keep default ClickHouse ports when exposed_ports is given - #98

Open
vitallium wants to merge 1 commit into
testcontainers:mainfrom
vitallium:vs/fix-clickhouse-with-exposed-ports
Open

vitallium wants to merge 1 commit into
testcontainers:mainfrom
vitallium:vs/fix-clickhouse-with-exposed-ports

Conversation

@vitallium

Copy link
Copy Markdown
Contributor

Hi! This PR fixes the accidental override of exposed_ports because passing exposed_ports: to ClickhouseContainer.new replacesthe default
9000/8123 ports. This happens because the hardcoded value was overridden by **kwargs. Without 8123 the HTTP wait strategy failed and clickhouse_url broke.

Expose the default ports in #start via with_exposed_ports, matching PostgresContainer. This adds them to any user-supplied ports instead of replacing them.

Passing `exposed_ports:` to `ClickhouseContainer.new` replaced the
default
9000/8123 ports, because the hardcoded value was overridden by **kwargs.
Without 8123 the HTTP wait strategy failed and `clickhouse_url` broke.

Expose the default ports in `#start` via `with_exposed_ports`, matching
`PostgresContainer`. This adds them to any user-supplied ports instead
of replacing them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant