Skip to content

Commit 03d0d9a

Browse files
committed
More isolated, robust git tests part 2?
It is a good change along the lines of (https://github.com/galaxyproject/planemo/pull/818/files) and odd git environment problems plagued attempts to write a Jenkinsfile for Planemo and seem to be hitting galaxyproject#821 for reasons I don't yet understand.
1 parent 5f994e7 commit 03d0d9a

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

.travis.yml

Lines changed: 0 additions & 3 deletions
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 "planemo_test@galaxyproject.org"
2118
- pip install tox coveralls
2219

2320
matrix:

tests/test_shed_upload.py

Lines changed: 16 additions & 15 deletions
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": "planemo@galaxyproject.org"}):
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)