diff options
Diffstat (limited to 'tests/integration_tests/clouds.py')
-rw-r--r-- | tests/integration_tests/clouds.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/integration_tests/clouds.py b/tests/integration_tests/clouds.py index 63240d17..9eebb10a 100644 --- a/tests/integration_tests/clouds.py +++ b/tests/integration_tests/clouds.py @@ -135,7 +135,7 @@ class IntegrationCloud(ABC): pycloudlib_instance = self.cloud_instance.launch(**launch_kwargs) return pycloudlib_instance - def launch(self, user_data=None, launch_kwargs=None, wait=True, + def launch(self, user_data=None, launch_kwargs=None, settings=integration_settings): if launch_kwargs is None: launch_kwargs = {} @@ -147,13 +147,9 @@ class IntegrationCloud(ABC): self.settings.EXISTING_INSTANCE_ID ) return - if 'wait' in launch_kwargs: - raise Exception("Specify 'wait' directly to launch, " - "not in 'launch_kwargs'") kwargs = { 'image_id': self.image_id, 'user_data': user_data, - 'wait': False, } kwargs.update(launch_kwargs) log.info( @@ -163,11 +159,9 @@ class IntegrationCloud(ABC): ) pycloudlib_instance = self._perform_launch(kwargs) - if wait: - pycloudlib_instance.wait(raise_on_cloudinit_failure=False) log.info('Launched instance: %s', pycloudlib_instance) instance = self.get_instance(pycloudlib_instance, settings) - if wait: + if kwargs.get('wait', True): # If we aren't waiting, we can't rely on command execution here log.info( 'cloud-init version: %s', @@ -277,7 +271,7 @@ class _LxdIntegrationCloud(IntegrationCloud): def _perform_launch(self, launch_kwargs): launch_kwargs['inst_type'] = launch_kwargs.pop('instance_type', None) - launch_kwargs.pop('wait') + wait = launch_kwargs.pop('wait', True) release = launch_kwargs.pop('image_id') try: @@ -293,7 +287,7 @@ class _LxdIntegrationCloud(IntegrationCloud): ) if self.settings.CLOUD_INIT_SOURCE == 'IN_PLACE': self._mount_source(pycloudlib_instance) - pycloudlib_instance.start(wait=False) + pycloudlib_instance.start(wait=wait) return pycloudlib_instance |