You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/05/14 23:37:59 UTC
git commit: Check for execute bit instead of executability since /tmp
filesystem may be mounted with noexec
Updated Branches:
refs/heads/master 58591155e -> 97ddc1593
Check for execute bit instead of executability since /tmp filesystem may be mounted with noexec
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/97ddc159
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/97ddc159
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/97ddc159
Branch: refs/heads/master
Commit: 97ddc1593a230fdd09f9cd65aab28a2ec31fc4ea
Parents: 5859115
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue May 14 19:40:13 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue May 14 21:15:48 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/tests/model/test_repository.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/97ddc159/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 1614069..795e4e3 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -17,6 +17,7 @@
import os
import shutil
+import stat
import unittest
import pkg_resources
import datetime
@@ -163,7 +164,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
assert not os.path.exists('/tmp/testgit.git/hooks/update')
assert not os.path.exists('/tmp/testgit.git/hooks/post-receive-user')
assert os.path.exists('/tmp/testgit.git/hooks/post-receive')
- assert os.access('/tmp/testgit.git/hooks/post-receive', os.X_OK)
+ assert os.stat('/tmp/testgit.git/hooks/post-receive')[0] & stat.S_IXUSR
@mock.patch('forgegit.model.git_repo.g.post_event')
def test_clone(self, post_event):
@@ -184,7 +185,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
assert not os.path.exists('/tmp/testgit.git/hooks/update')
assert not os.path.exists('/tmp/testgit.git/hooks/post-receive-user')
assert os.path.exists('/tmp/testgit.git/hooks/post-receive')
- assert os.access('/tmp/testgit.git/hooks/post-receive', os.X_OK)
+ assert os.stat('/tmp/testgit.git/hooks/post-receive')[0] & stat.S_IXUSR
with open('/tmp/testgit.git/hooks/post-receive') as f: c = f.read()
self.assertIn('curl -s http://localhost//auth/refresh_repo/p/test/src-git/\n', c)
self.assertIn('exec $DIR/post-receive-user\n', c)
@@ -213,7 +214,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
assert os.path.exists('/tmp/testgit.git/hooks/update')
assert os.path.exists('/tmp/testgit.git/hooks/post-receive-user')
assert os.path.exists('/tmp/testgit.git/hooks/post-receive')
- assert os.access('/tmp/testgit.git/hooks/post-receive', os.X_OK)
+ assert os.stat('/tmp/testgit.git/hooks/post-receive')[0] & stat.S_IXUSR
with open('/tmp/testgit.git/hooks/post-receive') as f: c = f.read()
self.assertIn('curl -s http://localhost//auth/refresh_repo/p/test/src-git/\n', c)
self.assertIn('exec $DIR/post-receive-user\n', c)