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 54430b5 commit 47efcc2
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions tests/foreman/api/test_http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,38 +173,29 @@ def test_positive_install_content_with_http_proxy(rhel_contenthost):
:parametrized: yes
"""
name = rhel_contenthost.name
runtime = rhel_contenthost._prov_inst.runtime
client = runtime.client

import podman

logger.info(f"tpapaioa podman version: {podman.__version__}")
logger.info(f"tpapaioa broker info: {name=}\n{runtime=}\n{client=}")
logger.info(f"tpapaioa podman server info: {client.version()}")
client = rhel_contenthost._prov_inst.runtime.client

def log_container_status(container_name):
container = client.containers.get(container_name)
logger.info(f"tpapaioa container status: {container.status}")

log_container_status(name)

sleep(3000)

# This command works
# result = rhel_contenthost.execute('ls')
result = rhel_contenthost.execute('ls')

# The container stops at some point
# log_container_status(name)
# sleep(5)
# log_container_status(name)
log_container_status(name)
sleep(30)
log_container_status(name)

# container = client.containers.get(name)
# logs = "\n".join(log.decode() for log in container.logs())
# logger.info(f"tpapaioa container {logs=}")

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


@pytest.mark.e2e
Expand Down

0 comments on commit 47efcc2

Please sign in to comment.