From aa6350f61d05bd18ecc1d92dd08090c43e4ef927 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Fri, 4 Dec 2020 14:55:46 -0600 Subject: 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. --- tests/integration_tests/instances.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/integration_tests/instances.py') 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: -- cgit v1.2.3