From 0ee64c74f94d31e38cb49758f0daeed4840703c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 19 Jul 2016 02:07:52 +0200 Subject: [PATCH] tests: cleanup after backup compatibility tests Backup compat tests use 'test-' prefix (as it was initially for all the tests. Since changing this right not may break those backups in non-trivial way, simply add cleanup for 'test-*' VMs. --- tests/backupcompatibility.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/backupcompatibility.py b/tests/backupcompatibility.py index 826830d2..cb7ca133 100644 --- a/tests/backupcompatibility.py +++ b/tests/backupcompatibility.py @@ -146,6 +146,19 @@ compression-filter=gzip ''' class TC_00_BackupCompatibility(qubes.tests.BackupTestsMixin, qubes.tests.QubesTestCase): + def tearDown(self): + self.qc.unlock_db() + self.qc.lock_db_for_writing() + self.qc.load() + + # Remove here as we use 'test-' prefix, instead of 'test-inst-' + self._remove_test_vms(self.qc, self.conn, prefix="test-") + + self.qc.save() + self.qc.unlock_db() + + super(TC_00_BackupCompatibility, self).tearDown() + def create_whitelisted_appmenus(self, filename): f = open(filename, "w") f.write("gnome-terminal.desktop\n")