summaryrefslogtreecommitdiff
path: root/tests/integration_tests/clouds.py
diff options
context:
space:
mode:
authorJames Falcon <TheRealFalcon@users.noreply.github.com>2021-01-26 11:25:04 -0600
committerGitHub <noreply@github.com>2021-01-26 12:25:04 -0500
commita9c904dc6438c908cd5341312311dfbbb18c81d2 (patch)
tree6d15e0b32a4a7f7160811225b1449ab4782cbb28 /tests/integration_tests/clouds.py
parent1527efa740ce7e66d9506ea62b0b8010d71a4104 (diff)
downloadvyos-cloud-init-a9c904dc6438c908cd5341312311dfbbb18c81d2.tar.gz
vyos-cloud-init-a9c904dc6438c908cd5341312311dfbbb18c81d2.zip
Remove 'remove-raise-on-failure' calls from integration_tests (#788)
pycloudlib no longer raises exceptions when cloud-init fails to start, and the API has been updated accordingly. Changes have been made to integration tests accordingly
Diffstat (limited to 'tests/integration_tests/clouds.py')
-rw-r--r--tests/integration_tests/clouds.py14
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