# HG changeset patch # User Marcin Kuzminski # Date 1362575697 -3600 # Node ID bc7fb3e8d77e5f35748794fafe1685d05c196c75 # Parent b45c8916644cda0b4d052b088ba42acd9caf9312 again they channged git return commands :/ and i need to fix the tests. Now running agains 1.8.1 diff -r b45c8916644c -r bc7fb3e8d77e rhodecode/tests/scripts/test_vcs_operations.py --- a/rhodecode/tests/scripts/test_vcs_operations.py Wed Mar 06 13:52:55 2013 +0100 +++ b/rhodecode/tests/scripts/test_vcs_operations.py Wed Mar 06 14:14:57 2013 +0100 @@ -4,9 +4,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test suite for making push/pull operations. - Run using:: + Run using after doing paster serve test.ini:: + RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests rhodecode/tests/scripts/test_vcs_operations.py - RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests rhodecode/tests/scripts/test_vcs_operations.py + You must have git > 1.8.1 for tests to work fine :created_on: Dec 30, 2010 :author: marcink @@ -107,13 +108,14 @@ for i in xrange(3): cmd = """echo 'added_line%s' >> %s""" % (i, added_file) Command(cwd).execute(cmd) + author_str = 'Marcin Kuźminski ' if vcs == 'hg': cmd = """hg commit -m 'commited new %s' -u '%s' %s """ % ( - i, 'Marcin Kuźminski ', added_file + i, author_str, added_file ) elif vcs == 'git': cmd = """git commit -m 'commited new %s' --author '%s' %s """ % ( - i, 'Marcin Kuźminski ', added_file + i, author_str, added_file ) Command(cwd).execute(cmd) # PUSH it back @@ -129,7 +131,7 @@ if vcs == 'hg': stdout, stderr = Command(cwd).execute('hg push --verbose', clone_url) elif vcs == 'git': - stdout, stderr = Command(cwd).execute('git push', clone_url + " master") + stdout, stderr = Command(cwd).execute('git push --verbose', clone_url + " master") return stdout, stderr @@ -324,8 +326,7 @@ #pull fails since repo is locked clone_url = _construct_url(GIT_REPO) stdout, stderr = Command('/tmp').execute('git clone', clone_url) - msg = ("""423 Repository `%s` locked by user `%s`""" - % (GIT_REPO, TEST_USER_ADMIN_LOGIN)) + msg = ("""The requested URL returned error: 423""") assert msg in stderr def test_push_on_locked_repo_by_other_user_hg(self): @@ -455,7 +456,8 @@ Session().commit() clone_url = _construct_url(GIT_REPO) stdout, stderr = Command('/tmp').execute('git clone', clone_url) - assert 'error: The requested URL returned error: 403 Forbidden' in stderr + msg = ("""The requested URL returned error: 403""") + assert msg in stderr finally: #release IP restrictions for ip in UserIpMap.getAll():