Skip to content

Commit 9811e64

Browse files
authored
Merge pull request #827 from jmchilton/isolated
More isolated, robust git tests part 2?
2 parents f191f48 + 03d0d9a commit 9811e64

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

.travis.yml

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ env:
1515
- TOX_ENV=py27-lint-docstrings
1616

1717
install:
18-
# Setup git to allow git operations.
19-
- git config --global user.name "Travis Test User"
20-
- git config --global user.email "[email protected]"
2118
- pip install tox coveralls
2219

2320
matrix:

tests/test_shed_upload.py

+16-15
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,22 @@ def test_update_with_force_create(self):
113113

114114
def test_tar_from_git(self):
115115
with self._isolate() as f:
116-
dest = join(f, "single_tool")
117-
self._copy_repo("single_tool", dest)
118-
shell(" && ".join([
119-
"cd %s" % dest,
120-
"git init",
121-
"git add .",
122-
"git commit -m 'initial commit'"
123-
]))
124-
upload_command = [
125-
"shed_update", "--force_repository_creation",
126-
"git+single_tool/.git"
127-
]
128-
upload_command.extend(self._shed_args())
129-
self._check_exit_code(upload_command)
130-
self._verify_single_uploaded(f, ["single_tool"])
116+
with modify_environ({"GIT_AUTHOR_NAME": "planemo developer", "EMAIL": "[email protected]"}):
117+
dest = join(f, "single_tool")
118+
self._copy_repo("single_tool", dest)
119+
shell(" && ".join([
120+
"cd %s" % dest,
121+
"git init",
122+
"git add .",
123+
"git commit -m 'initial commit'"
124+
]))
125+
upload_command = [
126+
"shed_update", "--force_repository_creation",
127+
"git+single_tool/.git"
128+
]
129+
upload_command.extend(self._shed_args())
130+
self._check_exit_code(upload_command)
131+
self._verify_single_uploaded(f, ["single_tool"])
131132

132133
def test_upload_from_git(self):
133134
with self._isolate() as f:

0 commit comments

Comments
 (0)