From 6b9023fa2cf8d1f8a2c89a4b31ea0d876e9ea1dc Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 22 Sep 2023 14:37:10 +0900 Subject: [PATCH] Ensure required flavor and image are configured Change-Id: I2a2f3fbf0c523e294dd52024a2f55c0ad158b15b --- heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py | 4 ++++ heat_tempest_plugin/tests/scenario/test_server_signal.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py b/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py index ce07262..46781d0 100644 --- a/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py +++ b/heat_tempest_plugin/tests/scenario/test_octavia_lbaas.py @@ -23,6 +23,10 @@ class LoadBalancerTest(scenario_base.ScenarioTestsBase): self.template_name = 'octavia_lbaas.yaml' self.member_template_name = 'lb_member.yaml' self.sub_dir = 'templates' + if not self.conf.minimal_image_ref: + raise self.skipException("No minimal image configured to test") + if not self.conf.minimal_instance_type: + raise self.skipException("No minimal flavor configured to test") def _create_stack(self): self.parameters = { diff --git a/heat_tempest_plugin/tests/scenario/test_server_signal.py b/heat_tempest_plugin/tests/scenario/test_server_signal.py index 167dfa0..c4deb3c 100644 --- a/heat_tempest_plugin/tests/scenario/test_server_signal.py +++ b/heat_tempest_plugin/tests/scenario/test_server_signal.py @@ -81,6 +81,10 @@ class ServerSignalIntegrationTest(scenario_base.ScenarioTestsBase): @decorators.idempotent_id('8da0f6cc-60e6-4298-9e54-e1f905c5552a') def test_server_signal_userdata_format_raw(self): + if not self.conf.minimal_image_ref: + raise self.skipException("No minimal image configured to test") + if not self.conf.minimal_instance_type: + raise self.skipException("No minimal flavor configured to test") self._test_server_signal(image=self.conf.minimal_image_ref, flavor=self.conf.minimal_instance_type) @@ -88,6 +92,8 @@ class ServerSignalIntegrationTest(scenario_base.ScenarioTestsBase): def test_server_signal_userdata_format_software_config(self): if not self.conf.image_ref: raise self.skipException("No image configured to test") + if not self.conf.instance_type: + raise self.skipException("No flavor configured to test") self._test_server_signal(user_data_format='SOFTWARE_CONFIG', image=self.conf.image_ref, flavor=self.conf.instance_type)