diff options
Diffstat (limited to 'test/lib/ansible_test/_internal/commands/integration/cloud/acme.py')
-rw-r--r-- | test/lib/ansible_test/_internal/commands/integration/cloud/acme.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/lib/ansible_test/_internal/commands/integration/cloud/acme.py b/test/lib/ansible_test/_internal/commands/integration/cloud/acme.py index 136c5331..e8020ca9 100644 --- a/test/lib/ansible_test/_internal/commands/integration/cloud/acme.py +++ b/test/lib/ansible_test/_internal/commands/integration/cloud/acme.py @@ -8,6 +8,7 @@ from ....config import ( ) from ....containers import ( + CleanupMode, run_support_container, ) @@ -21,6 +22,8 @@ from . import ( class ACMEProvider(CloudProvider): """ACME plugin. Sets up cloud resources for tests.""" + DOCKER_SIMULATOR_NAME = 'acme-simulator' + def __init__(self, args: IntegrationConfig) -> None: super().__init__(args) @@ -48,18 +51,17 @@ class ACMEProvider(CloudProvider): 14000, # Pebble ACME CA ] - descriptor = run_support_container( + run_support_container( self.args, self.platform, self.image, - 'acme-simulator', + self.DOCKER_SIMULATOR_NAME, ports, + allow_existing=True, + cleanup=CleanupMode.YES, ) - if not descriptor: - return - - self._set_cloud_config('acme_host', descriptor.name) + self._set_cloud_config('acme_host', self.DOCKER_SIMULATOR_NAME) def _setup_static(self) -> None: raise NotImplementedError() |