Skip to content

Commit

Permalink
Fix test for user profile in sd-app
Browse files Browse the repository at this point in the history
QUBES_GPG_DOMAIN will be conditionally set based on the running VM in order to support template consolidation. See freedomofpress/securedrop-client#1141
  • Loading branch information
emkll committed Oct 14, 2020
1 parent 56c86b1 commit a7cdf03
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ def setUp(self):

def test_decrypt_sd_user_profile(self):
contents = self._get_file_contents("/etc/profile.d/sd-app-qubes-gpg-domain.sh")
expected_content = 'export QUBES_GPG_DOMAIN="sd-gpg"\n'
expected_content = 'if [ "$(qubesdb-read /name)" = "sd-app" ]; then export QUBES_GPG_DOMAIN="sd-gpg"; fi\n' # noqa: E501
self.assertEqual(contents, expected_content)

def test_gpg_env_var(self):
cmd = 'echo "$QUBES_GPG_DOMAIN"'
contents = self._run(cmd)
expected_content = "sd-gpg"
self.assertEqual(contents, expected_content)

def test_open_in_dvm_desktop(self):
Expand Down

0 comments on commit a7cdf03

Please sign in to comment.