File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,16 +161,14 @@ def test_01_import_storage_policies(self):
161161 "Check if the number of imported policies is identical to the number of listed policies"
162162 )
163163
164- are_compatible_pools = False
165164 selected_policy = None
166165 for imported_policy in imported_policies :
167166 compatible_pools = self .list_storage_policy_compatible_pools (self .apiclient , imported_policy .id )
168- if len (compatible_pools ) > 0 :
169- are_compatible_pools = True
167+ if compatible_pools and len (compatible_pools ) > 0 :
170168 selected_policy = imported_policy
171169 break
172170
173- if not are_compatible_pools :
171+ if not selected_policy :
174172 self .skipTest ("There are no compatible storage pools with the imported policies" )
175173
176174 # Create service offering with the first storage policy from the list
You can’t perform that action at this time.
0 commit comments