summaryrefslogtreecommitdiff
path: root/tests/integration_tests/instances.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration_tests/instances.py')
-rw-r--r--tests/integration_tests/instances.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/integration_tests/instances.py b/tests/integration_tests/instances.py
index 0d1e1aef..0d9852c3 100644
--- a/tests/integration_tests/instances.py
+++ b/tests/integration_tests/instances.py
@@ -39,6 +39,7 @@ class CloudInitSource(Enum):
PROPOSED = 3
PPA = 4
DEB_PACKAGE = 5
+ UPGRADE = 6
def installs_new_version(self):
if self.name in [self.NONE.name, self.IN_PLACE.name]:
@@ -123,6 +124,8 @@ class IntegrationInstance:
self.install_ppa()
elif source == CloudInitSource.PROPOSED:
self.install_proposed_image()
+ elif source == CloudInitSource.UPGRADE:
+ self.upgrade_cloud_init()
else:
raise Exception(
"Specified to install {} which isn't supported here".format(
@@ -166,6 +169,11 @@ class IntegrationInstance:
remote_script = 'dpkg -i {path}'.format(path=remote_path)
self.execute(remote_script)
+ def upgrade_cloud_init(self):
+ log.info('Upgrading cloud-init to latest version in archive')
+ self.execute("apt-get update -q")
+ self.execute("apt-get install -qy cloud-init")
+
def __enter__(self):
return self