We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fb1a68 commit cfd6b12Copy full SHA for cfd6b12
testcontainers/kafka.py
@@ -43,8 +43,9 @@ def _connect(self):
43
raise KafkaError("Unable to connect with kafka container!")
44
45
def tc_start(self):
46
+ host = self.get_container_host_ip()
47
port = self.get_exposed_port(self.port_to_expose)
- listeners = 'PLAINTEXT://localhost:{},BROKER://$(hostname -i):9092'.format(port)
48
+ listeners = 'PLAINTEXT://{}:{},BROKER://$(hostname -i):9092'.format(host, port)
49
data = (
50
dedent(
51
"""
0 commit comments