diff --git a/rhodecode/lib/indexers/daemon.py b/rhodecode/lib/indexers/daemon.py
--- a/rhodecode/lib/indexers/daemon.py
+++ b/rhodecode/lib/indexers/daemon.py
@@ -40,7 +40,7 @@ from shutil import rmtree
from rhodecode.lib.indexers import INDEX_EXTENSIONS, IDX_LOCATION, SCHEMA, IDX_NAME
from time import mktime
-from vcs.exceptions import ChangesetError
+from vcs.exceptions import ChangesetError, RepositoryError
import logging
@@ -86,13 +86,16 @@ class WhooshIndexingDaemon(object):
based on repository walk function
"""
index_paths_ = set()
- for topnode, dirs, files in repo.walk('/', 'tip'):
- for f in files:
- index_paths_.add(jn(repo.path, f.path))
- for dir in dirs:
+ try:
+ for topnode, dirs, files in repo.walk('/', 'tip'):
for f in files:
index_paths_.add(jn(repo.path, f.path))
-
+ for dir in dirs:
+ for f in files:
+ index_paths_.add(jn(repo.path, f.path))
+
+ except RepositoryError:
+ pass
return index_paths_
def get_node(self, repo, path):
diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py
--- a/rhodecode/lib/utils.py
+++ b/rhodecode/lib/utils.py
@@ -467,8 +467,8 @@ def create_test_env(repos_test_path, con
log.addHandler(ch)
#PART ONE create db
- log.debug('making test db in %s', repos_test_path)
dbname = config['sqlalchemy.db1.url'].split('/')[-1]
+ log.debug('making test db %s', dbname)
dbmanage = DbManage(log_sql=True, dbname=dbname, root=config['here'],
tests=True)
diff --git a/rhodecode/tests/functional/test_changelog.py b/rhodecode/tests/functional/test_changelog.py
--- a/rhodecode/tests/functional/test_changelog.py
+++ b/rhodecode/tests/functional/test_changelog.py
@@ -4,5 +4,28 @@ class TestChangelogController(TestContro
def test_index(self):
self.log_user()
- response = self.app.get(url(controller='changelog', action='index',repo_name='vcs_test'))
- # Test response...
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'))
+
+ print response
+ assert """
""" in response.body, 'wrong info about number ofchanges'
+ assert """Small update at simplevcs app""" in response.body, 'missing info about commit message'
+ assert """
0""" in response.body, 'wrong info about removed nodes'
+ assert """
2""" in response.body, 'wrong info about changed nodes'
+ assert """
1""" in response.body, 'wrong info about added nodes'
+
+ #pagination
+
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':1})
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':2})
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':3})
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':4})
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':5})
+ response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':6})
+ # Test response after pagination...
+
+ assert """
20"""in response.body, 'wrong info about number of removed'
+ assert """
1"""in response.body, 'wrong info about number of changes'
+ assert """
0"""in response.body, 'wrong info about number of added'
+ assert """
commit 64: 46ad32a4f974@2010-04-20 00:33:21
"""in response.body, 'wrong info about commit 64'
+ assert """
"""in response.body, 'wrong info about commit 64 is a merge'
+
diff --git a/rhodecode/tests/functional/test_login.py b/rhodecode/tests/functional/test_login.py
--- a/rhodecode/tests/functional/test_login.py
+++ b/rhodecode/tests/functional/test_login.py
@@ -47,8 +47,8 @@ class TestLoginController(TestController
{'username':'error',
'password':'test'})
assert response.status == '200 OK', 'Wrong response from login page'
-
- assert 'Enter a value 6 characters long or more' in response.body, 'No error password message in response'
+ print response.body
+ assert 'Enter 6 characters or more' in response.body, 'No error password message in response'
def test_login_wrong_username_password(self):
response = self.app.post(url(controller='login', action='index'),
diff --git a/rhodecode/tests/functional/test_repos.py b/rhodecode/tests/functional/test_repos.py
--- a/rhodecode/tests/functional/test_repos.py
+++ b/rhodecode/tests/functional/test_repos.py
@@ -1,8 +1,10 @@
+from rhodecode.model.db import Repository
from rhodecode.tests import *
class TestReposController(TestController):
def test_index(self):
+ self.log_user()
response = self.app.get(url('repos'))
# Test response...
@@ -10,9 +12,35 @@ class TestReposController(TestController
response = self.app.get(url('formatted_repos', format='xml'))
def test_create(self):
- response = self.app.post(url('repos'))
+ self.log_user()
+ repo_name = 'vcs_test_new'
+ description = 'description for newly created repo'
+ private = False
+ response = self.app.post(url('repos'), {'repo_name':repo_name,
+ 'description':description,
+ 'private':private})
+
+ print response
+
+ #test if we have a message that fork is ok
+ assert '''created repository %s''' % (repo_name) in response.session['flash'][0], 'No flash message about new repo'
+
+ #test if the fork was created in the database
+ new_repo = self.sa.query(Repository).filter(Repository.repo_name == repo_name).one()
+
+ assert new_repo.repo_name == repo_name, 'wrong name of repo name in db'
+ assert new_repo.description == description, 'wrong description'
+
+ #test if repository is visible in the list ?
+ response = response.follow()
+
+ assert repo_name in response.body, 'missing new repo from the main repos list'
+
+
+
def test_new(self):
+ self.log_user()
response = self.app.get(url('new_repo'))
def test_new_as_xml(self):
@@ -31,6 +59,7 @@ class TestReposController(TestController
response = self.app.post(url('repo', repo_name='vcs_test'), params=dict(_method='delete'))
def test_show(self):
+ self.log_user()
response = self.app.get(url('repo', repo_name='vcs_test'))
def test_show_as_xml(self):
diff --git a/rhodecode/tests/functional/test_settings.py b/rhodecode/tests/functional/test_settings.py
--- a/rhodecode/tests/functional/test_settings.py
+++ b/rhodecode/tests/functional/test_settings.py
@@ -37,7 +37,7 @@ class TestSettingsController(TestControl
fork_repo = self.sa.query(Repository).filter(Repository.repo_name == fork_name).one()
assert fork_repo.repo_name == fork_name, 'wrong name of repo name in new db fork repo'
- assert fork_repo.fork.repo_name == repo_name, 'wron fork parrent'
+ assert fork_repo.fork.repo_name == repo_name, 'wrong fork parrent'
#test if fork is visible in the list ?
diff --git a/rhodecode/tests/functional/test_summary.py b/rhodecode/tests/functional/test_summary.py
--- a/rhodecode/tests/functional/test_summary.py
+++ b/rhodecode/tests/functional/test_summary.py
@@ -4,5 +4,8 @@ class TestSummaryController(TestControll
def test_index(self):
self.log_user()
- response = self.app.get(url(controller='summary', action='index',repo_name='vcs_test'))
+ response = self.app.get(url(controller='summary', action='index', repo_name='vcs_test'))
+ print response
+ assert """
""" in response.body
+
# Test response...