Merge lp:~jelmer/brz/gpghome into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merged at revision: 6776
Proposed branch: lp:~jelmer/brz/gpghome
Merge into: lp:brz
Prerequisite: lp:~jelmer/brz/commit-builder-no-file-ids
Diff against target: 33 lines (+6/-0)
2 files modified
breezy/tests/__init__.py (+2/-0)
doc/en/release-notes/brz-3.0.txt (+4/-0)
To merge this branch: bzr merge lp:~jelmer/brz/gpghome
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+329749@code.launchpad.net

This proposal supersedes a proposal from 2017-08-28.

Commit message

Set GNUPGHOME during tests, to prevent modifying users' test directory and test isolation issues.

Description of the change

Set GNUPGHOME during tests, to prevent modifying users' test directory and test isolation issues.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote : Posted in a previous version of this proposal

Change looks fine, but is based on an unlanded branch.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Sorry, updated with prerequisite branch.

Revision history for this message
Martin Packman (gz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/__init__.py'
2--- breezy/tests/__init__.py 2017-08-27 01:58:16 +0000
3+++ breezy/tests/__init__.py 2017-08-28 17:25:24 +0000
4@@ -141,6 +141,7 @@
5 isolated_environ = {
6 'BRZ_HOME': None,
7 'HOME': None,
8+ 'GNUPGHOME': None,
9 'XDG_CONFIG_HOME': None,
10 # brz now uses the Win32 API and doesn't rely on APPDATA, but the
11 # tests do check our impls match APPDATA
12@@ -2704,6 +2705,7 @@
13 test_home_dir = test_home_dir.encode(sys.getfilesystemencoding())
14 self.overrideEnv('HOME', test_home_dir)
15 self.overrideEnv('BRZ_HOME', test_home_dir)
16+ self.overrideEnv('GNUPGHOME', os.path.join(test_home_dir, '.gnupg'))
17
18 def setup_smart_server_with_call_log(self):
19 """Sets up a smart server as the transport server with a call log."""
20
21=== modified file 'doc/en/release-notes/brz-3.0.txt'
22--- doc/en/release-notes/brz-3.0.txt 2017-08-27 14:24:18 +0000
23+++ doc/en/release-notes/brz-3.0.txt 2017-08-28 17:25:24 +0000
24@@ -215,5 +215,9 @@
25 outputs subunit v2.
26 (Jelmer Vernooij, #1699346, #661205)
27
28+ * Set the ``GPGHOME`` environment variable during testing, to prevent
29+ e.g. leaking keys into the users' GNUPG directory.
30+ (Jelmer Vernooij, #843885)
31+
32 ..
33 vim: tw=74 ft=rst ff=unix

Subscribers

People subscribed via source and target branches