aboutsummaryrefslogtreecommitdiff
path: root/gitosis/test/test_access.py
diff options
context:
space:
mode:
authorTommi Virtanen <tv@eagain.net>2007-06-04 14:22:56 +0300
committerTommi Virtanen <tv@eagain.net>2007-06-04 14:22:56 +0300
commit0dc22b3155d359fc54d141e3355382ff044ba8e1 (patch)
treeae6290bf59c6781b53e941baa3e52b445115f088 /gitosis/test/test_access.py
parentAdd config option ``repositories``, for giving a path prefix to repositories. (diff)
downloadgitosis-dakkar-0dc22b3155d359fc54d141e3355382ff044ba8e1.tar.gz
gitosis-dakkar-0dc22b3155d359fc54d141e3355382ff044ba8e1.tar.bz2
gitosis-dakkar-0dc22b3155d359fc54d141e3355382ff044ba8e1.zip
Allow ``gitosis-serve`` incoming path names to always have ``.git`` suffix.
Strip it before processing further.
Diffstat (limited to 'gitosis/test/test_access.py')
-rw-r--r--gitosis/test/test_access.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gitosis/test/test_access.py b/gitosis/test/test_access.py
index 6e41a99..b9f2073 100644
--- a/gitosis/test/test_access.py
+++ b/gitosis/test/test_access.py
@@ -120,3 +120,12 @@ def test_base_local():
eq(access.haveAccess(
config=cfg, user='jdoe', mode='writable', path='foo/bar'),
'some/relative/path/baz/quux/thud')
+
+def test_dotgit():
+ # a .git extension is always allowed to be added
+ cfg = RawConfigParser()
+ cfg.add_section('group fooers')
+ cfg.set('group fooers', 'members', 'jdoe')
+ cfg.set('group fooers', 'writable', 'foo/bar')
+ eq(access.haveAccess(config=cfg, user='jdoe', mode='writable', path='foo/bar.git'),
+ 'foo/bar')