don't delete shutting down ec2 instances

This commit is contained in:
Tyler Johnson 2019-08-22 12:22:27 -06:00
parent 36029428a7
commit 802235d003
No known key found for this signature in database
GPG key ID: 691E31397E27D004

View file

@ -210,7 +210,9 @@ class CloudTest(ShellCase):
'''
query = self.query_instances()
for q in query:
if q.startswith(self.instance_name) and not q == self.instance_name:
# Verify but this is a new name and not a shutting down ec2 instance
if q.startswith(self.instance_name) and not (q == self.instance_name) \
and not (q.split('-')[-1].startswith('DEL')):
return q
def _ensure_deletion(self, instance_name=None):