tests: fix removing test VMs

Do it before shutting down qubesd socket - some things may require it
for VM removal/shutdown.
This commit is contained in:
Marek Marczykowski-Górecki 2017-06-20 16:15:41 +02:00
parent eee6ab0c01
commit ea5ca79133
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -649,6 +649,8 @@ class SystemTestsMixin(object):
self.reload_db() self.reload_db()
def tearDown(self): def tearDown(self):
self.remove_test_vms()
# close the servers before super(), because that might close the loop # close the servers before super(), because that might close the loop
for server in self.qubesd: for server in self.qubesd:
for sock in server.sockets: for sock in server.sockets:
@ -658,7 +660,6 @@ class SystemTestsMixin(object):
server.wait_closed() for server in self.qubesd])) server.wait_closed() for server in self.qubesd]))
super(SystemTestsMixin, self).tearDown() super(SystemTestsMixin, self).tearDown()
self.remove_test_vms()
# remove all references to VM objects, to release resources - most # remove all references to VM objects, to release resources - most
# importantly file descriptors; this object will live # importantly file descriptors; this object will live