Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion core/testcontainers/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from os import environ
from os.path import exists
from pathlib import Path
from typing import Union

MAX_TRIES = int(environ.get("TC_MAX_TRIES", 120))
SLEEP_TIME = int(environ.get("TC_POOLING_INTERVAL", 1))
Expand Down Expand Up @@ -47,7 +48,7 @@ class TestcontainersConfiguration:
ryuk_reconnection_timeout: str = RYUK_RECONNECTION_TIMEOUT
tc_properties: dict[str, str] = field(default_factory=read_tc_properties)

def tc_properties_get_tc_host(self):
def tc_properties_get_tc_host(self) -> Union[str, None]:
return self.tc_properties.get("tc.host")

@property
Expand Down
2 changes: 1 addition & 1 deletion core/testcontainers/core/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def get_logs(self) -> tuple[bytes, bytes]:
raise ContainerStartException("Container should be started before getting logs")
return self._container.logs(stderr=False), self._container.logs(stdout=False)

def exec(self, command) -> tuple[int, str]:
def exec(self, command) -> tuple[int, bytes]:
if not self._container:
raise ContainerStartException("Container should be started before executing a command")
return self._container.exec_run(command)
Expand Down