Changeset - 15dc5b2ff672
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-10-23 18:10:07
marcin@python-works.com
latest git version fixes issue with handling locking
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/tests/scripts/test_vcs_operations.py
Show inline comments
 
@@ -319,17 +319,14 @@ class TestVCSOperations(unittest.TestCas
 
        #lock repo
 
        r = Repository.get_by_repo_name(GIT_REPO)
 
        Repository.lock(r, User.get_by_username(TEST_USER_ADMIN_LOGIN).user_id)
 
        #pull fails since repo is locked
 
        clone_url = _construct_url(GIT_REPO)
 
        stdout, stderr = Command('/tmp').execute('git clone', clone_url)
 
        msg = ("""abort: HTTP Error 423: Repository `%s` locked by user `%s`"""
 
        msg = ("""423 Repository `%s` locked by user `%s`"""
 
                % (GIT_REPO, TEST_USER_ADMIN_LOGIN))
 
        #TODO: fix this somehow later on GIT, GIT is stupid and even if we throw
 
        # back 423 to it, it makes ANOTHER request and we fail there with 405 :/
 
        msg = "405 Method Not Allowed"
 
        assert msg in stderr
 

	
 
    def test_push_on_locked_repo_by_other_user_hg(self):
 
        #clone some temp
 
        DEST = _get_tmp_dir()
 
        clone_url = _construct_url(HG_REPO, dest=DEST)
0 comments (0 inline, 0 general)