Skip to content

Commit

Permalink
integration: test against the Ubuntu daily images
Browse files Browse the repository at this point in the history
Dailies are always available for stable releases and the devel release.
Moreover testing against dailies will warn us earlier about issues.
  • Loading branch information
paride committed Jan 19, 2022
1 parent 20bd192 commit e1972e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/integration_tests/clouds.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ class IntegrationCloud(ABC):
def __init__(self, settings=integration_settings):
self.settings = settings
self.cloud_instance = self._get_cloud_instance()
self.released_image_id = self._get_initial_image()
self.initial_image_id = self._get_initial_image()
self.snapshot_id = None

@property
def image_id(self):
if self.snapshot_id:
return self.snapshot_id
return self.released_image_id
return self.initial_image_id

def emit_settings_to_log(self) -> None:
log.info(
Expand All @@ -133,7 +133,7 @@ def _get_cloud_instance(self):
def _get_initial_image(self):
image = ImageSpecification.from_os_image()
try:
return self.cloud_instance.released_image(image.image_id)
return self.cloud_instance.daily_image(image.image_id)
except (ValueError, IndexError):
return image.image_id

Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_clean_boot_of_upgraded_package(session_cloud: IntegrationCloud):
return

launch_kwargs = {
"image_id": session_cloud.released_image_id,
"image_id": session_cloud.initial_image_id,
}

with session_cloud.launch(
Expand Down Expand Up @@ -178,7 +178,7 @@ def test_subsequent_boot_of_upgraded_package(session_cloud: IntegrationCloud):
pytest.skip(UNSUPPORTED_INSTALL_METHOD_MSG.format(source))
return # type checking doesn't understand that skip raises

launch_kwargs = {"image_id": session_cloud.released_image_id}
launch_kwargs = {"image_id": session_cloud.initial_image_id}

with session_cloud.launch(launch_kwargs=launch_kwargs) as instance:
instance.install_new_cloud_init(
Expand Down

0 comments on commit e1972e0

Please sign in to comment.