Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converts sd-proxy to SDW template base #488

Merged
merged 1 commit into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions dom0/sd-proxy.sls
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sd-proxy-template:
qvm.vm:
- name: sd-proxy-buster-template
- clone:
- source: whonix-ws-15
- source: securedrop-workstation-buster
- label: blue
- tags:
- add:
Expand All @@ -33,7 +33,6 @@ sd-proxy:
- prefs:
- template: sd-proxy-buster-template
- netvm: sd-whonix
- kernelopts: "nopat apparmor=1 security=apparmor"
- autostart: true
- tags:
- add:
Expand Down
12 changes: 6 additions & 6 deletions tests/test_proxy_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
class SD_Proxy_Tests(SD_VM_Local_Test):
def setUp(self):
self.vm_name = "sd-proxy"
self.whonix_apt_list = "/etc/apt/sources.list.d/whonix.list"
super(SD_Proxy_Tests, self).setUp()

def test_do_not_open_here(self):
Expand All @@ -32,13 +31,14 @@ def test_sd_proxy_yaml_config(self):
for line in wanted_lines:
self.assertFileHasLine("/etc/sd-proxy.yaml", line)

def test_whonix_ws_repo_enabled(self):
def test_whonix_ws_repo_absent(self):
"""
During Whonix 14 -> 15 migration, we removed the apt list file
(because the repo wasn't serving, due to EOL status). Let's
make sure it's there, since we're past 14 now.
The sd-proxy VM was previously based on Whonix Workstation,
but we've since moved to the standard SDW Debian-based template.
Guard against regressions by ensuring the old Whonix apt list
is missing.
"""
assert self._fileExists(self.whonix_apt_list)
assert not self._fileExists("/etc/apt/sources.list.d/whonix.list")

def test_logging_configured(self):
self.logging_configured()
Expand Down
2 changes: 0 additions & 2 deletions tests/test_vms_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ def test_sd_proxy_config(self):
vm = self.app.domains["sd-proxy"]
nvm = vm.netvm
self.assertTrue(nvm.name == "sd-whonix")
wanted_kernelopts = "nopat apparmor=1 security=apparmor"
self.assertEqual(vm.kernelopts, wanted_kernelopts)
self.assertTrue(vm.template == "sd-proxy-buster-template")
self.assertTrue(vm.autostart is True)
self.assertFalse(vm.provides_network)
Expand Down