From be76b2b344ae15bdd2b8546dbb907bbeaaea62e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 25 Jul 2023 19:00:57 +0200 Subject: [PATCH] tests: handle both whonix-gw and whonix-gateway names Whonix 17 templates use full whonix-gateway name. Match them both by whonix-g pattern. QubesOS/qubes-issues#1778 (cherry picked from commit c7653b6f9c2d3662e8c5fa18e5039a9c347de2eb) --- qubes/tests/integ/dispvm.py | 4 ++-- qubes/tests/integ/dom0_update.py | 2 +- qubes/tests/integ/mime.py | 2 +- qubes/tests/integ/vm_qrexec_gui.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qubes/tests/integ/dispvm.py b/qubes/tests/integ/dispvm.py index 78697acac..20fcc86e4 100644 --- a/qubes/tests/integ/dispvm.py +++ b/qubes/tests/integ/dispvm.py @@ -162,8 +162,8 @@ class TC_20_DispVMMixin(object): def setUp(self): super(TC_20_DispVMMixin, self).setUp() - if 'whonix-gw' in self.template: - self.skipTest('whonix-gw is not supported as DisposableVM Template') + if 'whonix-g' in self.template: + self.skipTest('whonix gateway is not supported as DisposableVM Template') self.init_default_template(self.template) self.disp_base = self.app.add_new_vm(qubes.vm.appvm.AppVM, name=self.make_vm_name('dvm'), diff --git a/qubes/tests/integ/dom0_update.py b/qubes/tests/integ/dom0_update.py index 7c1b976cb..6479389c0 100644 --- a/qubes/tests/integ/dom0_update.py +++ b/qubes/tests/integ/dom0_update.py @@ -431,7 +431,7 @@ def setUp(self): self.loop.run_until_complete(self.updatevm.create_on_disk()) self.app.updatevm = self.updatevm self.app.save() - if self.template.startswith('whonix-gw'): + if self.template.startswith('whonix-g'): self.loop.run_until_complete( self.whonix_gw_setup_async(self.updatevm)) else: diff --git a/qubes/tests/integ/mime.py b/qubes/tests/integ/mime.py index 6cd4b502b..612e3d435 100644 --- a/qubes/tests/integ/mime.py +++ b/qubes/tests/integ/mime.py @@ -44,7 +44,7 @@ class TC_50_MimeHandlers: def setUp(self): super(TC_50_MimeHandlers, self).setUp() - if self.template.startswith('whonix-gw') or 'minimal' in self.template: + if self.template.startswith('whonix-g') or 'minimal' in self.template: raise unittest.SkipTest( 'Template {} not supported by this test'.format(self.template)) diff --git a/qubes/tests/integ/vm_qrexec_gui.py b/qubes/tests/integ/vm_qrexec_gui.py index 4631c0425..36a01f29f 100644 --- a/qubes/tests/integ/vm_qrexec_gui.py +++ b/qubes/tests/integ/vm_qrexec_gui.py @@ -57,7 +57,7 @@ def setUp(self): name=self.make_vm_name('vm2'), template=self.app.domains[self.template]) self.loop.run_until_complete(self.testvm2.create_on_disk()) - if self.template.startswith('whonix-gw'): + if self.template.startswith('whonix-g'): # Whonix Gateway loudly complains if the VM doesn't provide network, # which spams the screen with error messages that interfere with # other tests @@ -437,8 +437,8 @@ def wait_for_pulseaudio_startup(self, vm): self.loop.run_until_complete(asyncio.sleep(1)) def prepare_audio_vm(self): - if 'whonix-gw' in self.template: - self.skipTest('whonix-gw have no audio') + if 'whonix-g' in self.template: + self.skipTest('whonix-g have no audio') self.loop.run_until_complete(self.testvm1.start()) try: self.loop.run_until_complete(