Skip to content

Commit

Permalink
Debug PRT
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapaioa committed Sep 12, 2024
1 parent a48de76 commit 3c7edcc
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions tests/foreman/api/test_http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,25 @@ def test_positive_install_content_with_http_proxy(rhel_contenthost):
)

name = rhel_contenthost.name
my_container = rhel_contenthost._prov_inst.runtime.client.containers.get(name)
logger.info(f"tpapaioa status 1 {my_container.status}")

# container_logs = "\n".join(my_container.logs())
my_logs = "\n".join(log.decode() for log in my_container.logs())
logger.info(f"tpapaioa 1 {my_logs=}")
my_container = rhel_contenthost._prov_inst.runtime.client.containers.get(name)
logger.info(f"tpapaioa 1 status={my_container.status}")

# First command works
# This command works
result = rhel_contenthost.execute('ls')
my_logs = "\n".join(log.decode() for log in my_container.logs())
logger.info(f"tpapaioa status 2 {my_container.status}")
logger.info(f"tpapaioa 2 {my_logs=}")

# Container stops somewhere here
my_container = rhel_contenthost._prov_inst.runtime.client.containers.get(name)
logger.info(f"tpapaioa 2 status={my_container.status}")

# The container stops somewhere here?
time.sleep(30)

my_container = rhel_contenthost._prov_inst.runtime.client.containers.get(name)
my_logs = "\n".join(log.decode() for log in my_container.logs())
logger.info(f"tpapaioa status 3 {my_container.status}")
logger.info(f"tpapaioa 3 status={my_container.status}")
logger.info(f"tpapaioa 3 {my_logs=}")

# Second command fails
# This command fails
result = rhel_contenthost.execute('ls')
assert result

Expand Down

0 comments on commit 3c7edcc

Please sign in to comment.