Browse Source

Override E-mail in Gerrit integration tests

On test platforms where the default hostname is not an FQDN, git
fails to guess a usable E-mail address. We don't actually care what
E-mail address these tests see, so override it with a known working
value.

Change-Id: Id65af4876b9658c34a10d1a8f5c72813830725c4
tags/1.0.0
Jeremy Stanley 4 years ago
parent
commit
0bb2461a2c
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      git_review/tests/__init__.py

+ 1
- 0
git_review/tests/__init__.py View File

@@ -179,6 +179,7 @@ class BaseGitReviewTestCase(testtools.TestCase, GerritHelpers):
179 179
         os.environ['HOME'] = self.home_dir
180 180
         os.environ['XDG_CONFIG_HOME'] = self.xdg_config_dir
181 181
         os.environ['GIT_CONFIG_NOSYSTEM'] = "1"
182
+        os.environ['EMAIL'] = "you@example.com"
182 183
         if not os.path.exists(self.home_dir):
183 184
             os.mkdir(self.home_dir)
184 185
         if not os.path.exists(self.xdg_config_dir):

Loading…
Cancel
Save