commit | 2803b57d6cbdf8281a0a495595c071f49e915042 | [log] [tgz] |
---|---|---|
author | Ghanshyam Mann <gmann@ghanshyammann.com> | Fri Aug 04 12:11:59 2023 -0700 |
committer | Ghanshyam <gmann@ghanshyammann.com> | Fri Aug 04 19:38:16 2023 +0000 |
tree | 434a8db6b0b44049f1477b5e8f7a1097eb288e0d | |
parent | fd90dacc8e1edfa407eaede4a83147d3f87ef424 [diff] [blame] |
Skip scenario tests early to avoid unnecessary setup This is change for the volume scenario test to skip them early. When we skip the test class using skip_checks(), it check the conditions and skip the test class at first step without creating any keystone credentials. But when tests are skipped with other decorator at test level then it does create keystone credentials, setup network resources and service clients. This will mostly help neutron gate where these volume tests will be skipped in the initial stage only and will not create the keystone and network resources. One good example is TestEncryptedCinderVolumes which is skipped - https://zuul.openstack.org/build/babcc06f24764a408ed77702365b4c5b/log/job-output.txt#28695 But it still does the resources setup - https://zuul.openstack.org/build/babcc06f24764a408ed77702365b4c5b/log/controller/logs/tempest_log.txt#6374-6450 Related-Bug: #2004780 Change-Id: I59cd39c20b995bf2ed2f58f4522743c3ca51b516
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py index 5513f4d..6372c6b 100644 --- a/tempest/scenario/test_minimum_basic.py +++ b/tempest/scenario/test_minimum_basic.py
@@ -38,6 +38,12 @@ * check command outputs """ + @classmethod + def skip_checks(cls): + super(TestMinimumBasicScenario, cls).skip_checks() + if not CONF.service_available.cinder: + raise cls.skipException("Cinder is not available") + def nova_show(self, server): got_server = (self.servers_client.show_server(server['id']) ['server'])