Skip to content

Commit

Permalink
Fix svs_disp tests and add test for paxctld
Browse files Browse the repository at this point in the history
Some sd-svs-disp tests were not running, moving sd-svs-disp tests to their own file resolves.
  • Loading branch information
emkll committed Jun 6, 2019
1 parent 934b48c commit d08eb8d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
13 changes: 0 additions & 13 deletions tests/test_svs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@ def test_sd_client_package_installed(self):
self.assertTrue(self._package_is_installed("securedrop-client"))


class SD_SVS_Disp_Tests(SD_VM_Local_Test):
def setUp(self):
self.vm_name = "sd-svs-disp"
super(SD_SVS_Disp_Tests, self).setUp()

def test_sd_client_package_installed(self):
pkg = "securedrop-workstation-svs-disp"
self.assertTrue(self._package_is_installed(pkg))

def test_sd_svs_libreoffice_installed(self):
self.assertTrue(self._package_is_installed("libreoffice"))


def load_tests(loader, tests, pattern):
suite = unittest.TestLoader().loadTestsFromTestCase(SD_SVS_Tests)
return suite
28 changes: 28 additions & 0 deletions tests/test_svs_disp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import subprocess
import unittest

from base import SD_VM_Local_Test


class SD_SVS_Disp_Tests(SD_VM_Local_Test):
def setUp(self):
self.vm_name = "sd-svs-disp"
super(SD_SVS_Disp_Tests, self).setUp()

def test_sd_client_package_installed(self):
pkg = "securedrop-workstation-svs-disp"
self.assertTrue(self._package_is_installed(pkg))

def test_sd_svs_libreoffice_installed(self):
self.assertTrue(self._package_is_installed("libreoffice"))

def test_sd_svs_paxctld_is_running(self):
cmd = ["qvm-run", "-p", "sd-svs-disp",
"/usr/sbin/service paxctld status"]
p = subprocess.check_output(cmd)
self.assertTrue("active (running)".encode() in p)


def load_tests(loader, tests, pattern):
suite = unittest.TestLoader().loadTestsFromTestCase(SD_SVS_Disp_Tests)
return suite

0 comments on commit d08eb8d

Please sign in to comment.