diff --git a/conf/container.yaml.template b/conf/container.yaml.template index c10b1fb29d2..3970cb604ff 100644 --- a/conf/container.yaml.template +++ b/conf/container.yaml.template @@ -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 diff --git a/robottelo/config/validators.py b/robottelo/config/validators.py index f2b69db7ea3..8f7ada84449 100644 --- a/robottelo/config/validators.py +++ b/robottelo/config/validators.py @@ -119,7 +119,7 @@ 'container.upstream_name', must_exist=True, is_type_of=str, - default='library/busybox', + default='jmalloc/echo-server', ), Validator( 'container.alternative_upstream_names', diff --git a/tests/foreman/cli/test_container_management.py b/tests/foreman/cli/test_container_management.py index bf038a7e7ef..85de4d4cd7e 100644 --- a/tests/foreman/cli/test_container_management.py +++ b/tests/foreman/cli/test_container_management.py @@ -11,6 +11,7 @@ """ from datetime import UTC, datetime +import re from box import Box from fauxfactory import gen_string @@ -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"]}')