Skip to content

Commit

Permalink
tests: handle both whonix-gw and whonix-gateway names
Browse files Browse the repository at this point in the history
Whonix 17 templates use full whonix-gateway name. Match them both by
whonix-g pattern.

QubesOS/qubes-issues#1778

(cherry picked from commit c7653b6)
  • Loading branch information
marmarek committed Jan 20, 2024
1 parent 05d8ce9 commit be76b2b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions qubes/tests/integ/dispvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion qubes/tests/integ/dom0_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion qubes/tests/integ/mime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
6 changes: 3 additions & 3 deletions qubes/tests/integ/vm_qrexec_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit be76b2b

Please sign in to comment.