diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-11-02 13:40:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 13:40:10 -0500 |
commit | d619f5171ac0ce5b626ef4575ad5f4468e94c987 (patch) | |
tree | cee3196d3aa0c058a09f60a09ea0899d90b673bd /tests/integration_tests/clouds.py | |
parent | 2ea3121fece7dcdb0d5c424cb6fc597699c0e895 (diff) | |
download | vyos-cloud-init-d619f5171ac0ce5b626ef4575ad5f4468e94c987.tar.gz vyos-cloud-init-d619f5171ac0ce5b626ef4575ad5f4468e94c987.zip |
integration_tests: various launch improvements (#638)
* integration_tests: fix passing launch_kwargs to session_cloud.launch
* integration_tests: log the launch_kwargs before launching instances
* integration_tests: add support for specifying instance name for tests
Co-authored-by: Rick Harding <rharding@mitechie.com>
Diffstat (limited to 'tests/integration_tests/clouds.py')
-rw-r--r-- | tests/integration_tests/clouds.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/integration_tests/clouds.py b/tests/integration_tests/clouds.py index 06f1c623..08c86198 100644 --- a/tests/integration_tests/clouds.py +++ b/tests/integration_tests/clouds.py @@ -54,13 +54,18 @@ class IntegrationCloud(ABC): self.settings.EXISTING_INSTANCE_ID ) return - launch_kwargs = { + kwargs = { 'image_id': self.image_id, 'user_data': user_data, 'wait': False, } - launch_kwargs.update(launch_kwargs) - pycloudlib_instance = self.cloud_instance.launch(**launch_kwargs) + kwargs.update(launch_kwargs) + log.info( + "Launching instance with launch_kwargs:\n{}".format( + "\n".join("{}={}".format(*item) for item in kwargs.items()) + ) + ) + pycloudlib_instance = self.cloud_instance.launch(**kwargs) pycloudlib_instance.wait(raise_on_cloudinit_failure=False) log.info('Launched instance: %s', pycloudlib_instance) return self.get_instance(pycloudlib_instance, settings) |