Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def get_validated_source(
return CloudInitSource.PPA
elif os.path.isfile(str(source)):
return CloudInitSource.DEB_PACKAGE
elif source == "UPGRADE":
return CloudInitSource.UPGRADE
raise ValueError(
'Invalid value for CLOUD_INIT_SOURCE setting: {}'.format(source))

Expand Down
8 changes: 8 additions & 0 deletions tests/integration_tests/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -123,6 +124,8 @@ def install_new_cloud_init(
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(
Expand Down Expand Up @@ -166,6 +169,11 @@ def install_deb(self):
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

Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/integration_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
# code.
# PROPOSED
# Install from the Ubuntu proposed repo
# UPGRADE
# Upgrade cloud-init to the version in the Ubuntu archive
# <ppa repo>, e.g., ppa:cloud-init-dev/proposed
# Install from a PPA. It MUST start with 'ppa:'
# <file path>
Expand Down