Skip to content

Commit

Permalink
More isolated, robust git tests part 2?
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmchilton committed May 16, 2018
1 parent 5f994e7 commit 03d0d9a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ env:
- TOX_ENV=py27-lint-docstrings

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

matrix:
Expand Down
31 changes: 16 additions & 15 deletions tests/test_shed_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,22 @@ def test_update_with_force_create(self):

def test_tar_from_git(self):
with self._isolate() as f:
dest = join(f, "single_tool")
self._copy_repo("single_tool", dest)
shell(" && ".join([
"cd %s" % dest,
"git init",
"git add .",
"git commit -m 'initial commit'"
]))
upload_command = [
"shed_update", "--force_repository_creation",
"git+single_tool/.git"
]
upload_command.extend(self._shed_args())
self._check_exit_code(upload_command)
self._verify_single_uploaded(f, ["single_tool"])
with modify_environ({"GIT_AUTHOR_NAME": "planemo developer", "EMAIL": "[email protected]"}):
dest = join(f, "single_tool")
self._copy_repo("single_tool", dest)
shell(" && ".join([
"cd %s" % dest,
"git init",
"git add .",
"git commit -m 'initial commit'"
]))
upload_command = [
"shed_update", "--force_repository_creation",
"git+single_tool/.git"
]
upload_command.extend(self._shed_args())
self._check_exit_code(upload_command)
self._verify_single_uploaded(f, ["single_tool"])

def test_upload_from_git(self):
with self._isolate() as f:
Expand Down

0 comments on commit 03d0d9a

Please sign in to comment.