Skip to content

Commit

Permalink
fix log getting
Browse files Browse the repository at this point in the history
  • Loading branch information
dhirving committed Nov 15, 2023
1 parent c725ba9 commit cff4fae
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests_integration/test_docker_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ def _run_server_docker():
server_host = container.get_container_host_ip()
server_port = container.get_exposed_port(port)
server_url = f"http://{server_host}:{server_port}/api/butler"
yield server_url
(stdout, stderr) = container.get_logs()
if stdout:
print("STDOUT:")
print(stdout)
if stderr:
print("STDERR:")
print(stderr)
try:
yield server_url
finally:
(stdout, stderr) = container.get_logs()
if stdout:
print("STDOUT:")
print(stdout)
if stderr:
print("STDERR:")
print(stderr)


class ButlerDockerTestCase(unittest.TestCase):
Expand Down

0 comments on commit cff4fae

Please sign in to comment.