Skip to content

Commit

Permalink
Adds config tests for autostart AppVMs
Browse files Browse the repository at this point in the history
sd-whonix has long been set as autostart, but we didn't have a
corresponding config test for it. We recently enabled autostart
on sd-gpg and sd-proxy, those now also have config tests.

It's a bit anti-Pythonic to `assertTrue(x == True)`, rather than
just `assertTrue(x)`, but trying to be explicit about what the
underlying qubesadmin API returns.
  • Loading branch information
Conor Schaefer committed May 16, 2019
1 parent 015f993 commit ce4e7ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_vms_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_sd_whonix_config(self):
self.assertEqual(vm.kernelopts, wanted_kernelopts)
self.assertTrue(vm.template == "whonix-gw-14")
self.assertTrue(vm.provides_network)
self.assertTrue(vm.autostart == True)
self.assertFalse(vm.template_for_dispvms)
self.assertTrue('sd-workstation' in vm.tags)

Expand All @@ -51,6 +52,7 @@ def test_sd_proxy_config(self):
wanted_kernelopts = "nopat apparmor=1 security=apparmor"
self.assertEqual(vm.kernelopts, wanted_kernelopts)
self.assertTrue(vm.template == "sd-proxy-template")
self.assertTrue(vm.autostart == True)
self.assertFalse(vm.provides_network)
self.assertFalse(vm.template_for_dispvms)
self.assertTrue('sd-workstation' in vm.tags)
Expand Down Expand Up @@ -81,6 +83,7 @@ def test_sd_gpg_config(self):
self.assertTrue(nvm is None)
# No sd-gpg-template, since keyring is managed in $HOME
self.assertTrue(vm.template == "sd-workstation-template")
self.assertTrue(vm.autostart == True)
self.assertFalse(vm.provides_network)
self.assertFalse(vm.template_for_dispvms)
self._check_kernel(vm)
Expand Down

0 comments on commit ce4e7ae

Please sign in to comment.