summaryrefslogtreecommitdiff
path: root/tests/integration_tests/instances.py
diff options
context:
space:
mode:
authorJames Falcon <TheRealFalcon@users.noreply.github.com>2020-12-04 14:55:46 -0600
committerGitHub <noreply@github.com>2020-12-04 13:55:46 -0700
commitaa6350f61d05bd18ecc1d92dd08090c43e4ef927 (patch)
treee5ff24aa82e427d714fe12f761365632e1a2f8f8 /tests/integration_tests/instances.py
parent974145d063afac3934a9b7c506bebf4318f9424d (diff)
downloadvyos-cloud-init-aa6350f61d05bd18ecc1d92dd08090c43e4ef927.tar.gz
vyos-cloud-init-aa6350f61d05bd18ecc1d92dd08090c43e4ef927.zip
Integration test for 570 (#712)
Test that we can add optional vendor-data to the seedfrom file in a NoCloud environment. Also added the option to pass raise_on_cloudinit_failure through an instance restart so we get automatic failure checking when we need to manually reboot.
Diffstat (limited to 'tests/integration_tests/instances.py')
-rw-r--r--tests/integration_tests/instances.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration_tests/instances.py b/tests/integration_tests/instances.py
index c68ee753..f8f98e42 100644
--- a/tests/integration_tests/instances.py
+++ b/tests/integration_tests/instances.py
@@ -35,7 +35,7 @@ class IntegrationInstance:
def destroy(self):
self.instance.delete()
- def restart(self):
+ def restart(self, raise_on_cloudinit_failure=False):
"""Restart this instance (via cloud mechanism) and wait for boot.
This wraps pycloudlib's `BaseInstance.restart` to pass
@@ -44,7 +44,9 @@ class IntegrationInstance:
"""
self.instance.restart(wait=False)
log.info("Instance restarted; waiting for boot")
- self.instance.wait(raise_on_cloudinit_failure=False)
+ self.instance.wait(
+ raise_on_cloudinit_failure=raise_on_cloudinit_failure
+ )
def execute(self, command, *, use_sudo=True) -> Result:
if self.instance.username == 'root' and use_sudo is False: