Skip to content

Commit

Permalink
Test vms are set to internal
Browse files Browse the repository at this point in the history
  • Loading branch information
deeplow authored and legoktm committed Jun 26, 2024
1 parent c11715a commit 012b7ed
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_vms_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
)
from qubesadmin import Qubes

with open("config.json") as f:
CONFIG = json.load(f)


class SD_VM_Tests(unittest.TestCase):
def setUp(self):
Expand All @@ -29,6 +32,16 @@ def test_expected(self):
expected_vms = set(SD_VMS + SD_DVM_TEMPLATES + SD_TEMPLATES)
self.assertEqual(set(sdw_tagged_vm_names), set(expected_vms))

@unittest.skipIf(CONFIG["environment"] != "prod", "Skipping on non-prod system")
def test_internal(self):
not_internal = ["sd-proxy", "sd-whonix", "sd-devices"]

for vm_name in SD_VMS:
if vm_name in not_internal:
continue
vm = self.app.domains[vm_name]
self.assertEqual(vm.features.get("internal"), "1")

def test_grsec_kernel(self):
"""
Confirms expected grsecurity-patched kernel is running.
Expand Down

0 comments on commit 012b7ed

Please sign in to comment.