From 7d4be8133c14ed3fe5373fc0af36d83922ff4d0b Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Thu, 16 May 2019 12:54:56 -0700 Subject: [PATCH] Adds config tests for autostart AppVMs 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 is True)`, rather than just `assertTrue(x)`, but trying to be explicit about what the underlying qubesadmin API returns. --- tests/test_vms_exist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_vms_exist.py b/tests/test_vms_exist.py index a421bb6f..93172ec3 100644 --- a/tests/test_vms_exist.py +++ b/tests/test_vms_exist.py @@ -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 is True) self.assertFalse(vm.template_for_dispvms) self.assertTrue('sd-workstation' in vm.tags) @@ -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 is True) self.assertFalse(vm.provides_network) self.assertFalse(vm.template_for_dispvms) self.assertTrue('sd-workstation' in vm.tags) @@ -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 is True) self.assertFalse(vm.provides_network) self.assertFalse(vm.template_for_dispvms) self._check_kernel(vm)