Skip to content

Commit

Permalink
Remove unnecessary vmname testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
eloquence committed Oct 13, 2020
1 parent b4c36d6 commit 8bd155e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 1 addition & 7 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ def _fileExists(self, remote_path):

return True

def logging_configured(self, vmname=False):
def logging_configured(self):
"""
Make sure rsyslog is configured to send in data to sd-log vm.
Takes an optional 'vmname' argument, in case hostname
returned by system is an insufficient identifier, e.g. Whonix.
"""
self.assertTrue(self._package_is_installed("securedrop-log"))
self.assertTrue(self._fileExists("/usr/sbin/sd-rsyslog"))
Expand All @@ -120,10 +118,6 @@ def logging_configured(self, vmname=False):
static_content = """[sd-rsyslog]
remotevm = sd-log
"""
# A hardcoded vmname should only be present if required,
# since securedrop-log will default to value of `hostname`.
if vmname:
static_content += "localvm = {}\n".format(self.vm_name)
self.assertEqual(file_content, static_content)
# Check for evidence of misconfigured logging in syslog,
# fail if matching events found
Expand Down
3 changes: 0 additions & 3 deletions tests/test_sd_whonix.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ def test_sd_whonix_repo_enabled(self):
"""
assert self._fileExists(self.whonix_apt_list)

def test_logging_configured(self):
self.logging_configured(vmname=True)

def test_sd_whonix_verify_tor_config(self):
# User must be debian-tor for v3 Onion, due to restrictive
# mode on the client keys directory.
Expand Down

0 comments on commit 8bd155e

Please sign in to comment.