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
2 changes: 1 addition & 1 deletion conf/container.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONTAINER:
- docker
- podman
REGISTRY_HUB: https://mirror.gcr.io
UPSTREAM_NAME: 'library/busybox'
UPSTREAM_NAME: jmalloc/echo-server
ALTERNATIVE_UPSTREAM_NAMES:
- hello-world
- alpine
Expand Down
2 changes: 1 addition & 1 deletion robottelo/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
'container.upstream_name',
must_exist=True,
is_type_of=str,
default='library/busybox',
default='jmalloc/echo-server',
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
),
Validator(
'container.alternative_upstream_names',
Expand Down
17 changes: 10 additions & 7 deletions tests/foreman/cli/test_container_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""

from datetime import UTC, datetime
import re

from box import Box
from fauxfactory import gen_string
Expand Down Expand Up @@ -94,16 +95,18 @@ def test_positive_pull_image(
)
assert result.status == 0
try:
result = module_container_contenthost.execute(f'docker run {repo["published-at"]}')
result = module_container_contenthost.execute(
f'docker run -d {repo["published-at"]}'
)
assert result.status == 0
match = re.match(r'^[0-9a-f]+$', result.stdout)
if match:
container_id = match.group(0)
finally:
# Stop and remove the container
result = module_container_contenthost.execute(
f'docker ps -a | grep {repo["published-at"]}'
)
container_id = result.stdout[0].split()[0]
module_container_contenthost.execute(f'docker stop {container_id}')
module_container_contenthost.execute(f'docker rm {container_id}')
if container_id:
module_container_contenthost.execute(f'docker stop {container_id}')
module_container_contenthost.execute(f'docker rm {container_id}')
finally:
# Remove docker image
module_container_contenthost.execute(f'docker rmi {repo["published-at"]}')
Expand Down
Loading