mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
renamed _alt_name function
This commit is contained in:
parent
23beab46e7
commit
5500ede3e9
1 changed files with 4 additions and 4 deletions
|
@ -213,7 +213,7 @@ class CloudTest(ShellCase):
|
|||
if q.startswith(self.instance_name) and not q == self.instance_name:
|
||||
return q
|
||||
|
||||
def __ensure_deletion(self, instance_name=None):
|
||||
def _ensure_deletion(self, instance_name=None):
|
||||
'''
|
||||
Make sure that the instance absolutely gets deleted, but fail the test if it happens in the tearDown
|
||||
:return True if an instance was deleted, False if no instance was deleted; and a message
|
||||
|
@ -249,10 +249,10 @@ class CloudTest(ShellCase):
|
|||
one time in a test for each instance created. This is a failSafe and something went wrong
|
||||
if the tearDown is where an instance is destroyed.
|
||||
'''
|
||||
instance_destroyed, destroy_message = self.__ensure_deletion()
|
||||
alt_name = self._alt_name_exists()
|
||||
instance_destroyed, destroy_message = self._ensure_deletion()
|
||||
alt_name = self._alt_name()
|
||||
if alt_name:
|
||||
alt_destroyed, alt_destroy_message = self.__ensure_deletion(alt_name)
|
||||
alt_destroyed, alt_destroy_message = self._ensure_deletion(alt_name)
|
||||
self.assertTrue(instance_destroyed and alt_destroyed, destroy_message + ' :: ' + alt_destroy_message)
|
||||
else:
|
||||
self.assertTrue(instance_destroyed, destroy_message)
|
||||
|
|
Loading…
Add table
Reference in a new issue