test: wait for the ip

This commit is contained in:
Roman 2025-01-07 20:47:38 +08:00
parent 5746748581
commit 54f91fd5b7
No known key found for this signature in database
GPG Key ID: B8FE070B54E11B75
2 changed files with 4 additions and 3 deletions

View File

@ -66,9 +66,6 @@ class DockerManager:
# logger.debug(f"docker network connect --ip {container_ip} {NETWORK_NAME} {container.id}")
# network.connect(container, ipv4_address=container_ip)
attrs = container.attrs
logger.debug(f"Container started with attributes {attrs}")
logger.debug(f"Container started with ID {container.short_id}. Setting up logs at {log_path}")
log_thread = threading.Thread(target=self._log_container_output, args=(container, log_path))
log_thread.daemon = True

View File

@ -85,6 +85,10 @@ class NomosNode:
logger.debug(f"Container returned {self._container}")
logger.debug(f"Started container from image {self._image_name}. " f"REST: {getattr(self, '_tcp_port', 'N/A')}")
delay(1)
attached_ip = self._container.attrs["NetworkSettings"]["IPAddress"]
logger.debug(f"Container started with IP {attached_ip}")
# try:
# self.ensure_ready(timeout_duration=wait_for_node_sec)
# except Exception as ex: