Added unittest for SVN push hook
This commit is contained in:
@@ -43,4 +43,5 @@ def create_svner_account(email, project_url):
|
||||
log.error('Unable to find project url=%s', project_url)
|
||||
return 1
|
||||
|
||||
create_service_account(email, [u'svner'], {'svner': {'project': proj['_id']}})
|
||||
account, token = create_service_account(email, [u'svner'], {'svner': {'project': proj['_id']}})
|
||||
return account, token
|
||||
|
@@ -50,7 +50,8 @@ def obtain(server_location):
|
||||
@attr.s
|
||||
class CommitLogObserver(object):
|
||||
svn_client = attr.ib(default=None,
|
||||
validator=attr.validators.instance_of(svn.remote.RemoteClient))
|
||||
validator=attr.validators.optional(
|
||||
attr.validators.instance_of(svn.remote.RemoteClient)))
|
||||
last_seen_revision = attr.ib(default=0, validator=attr.validators.instance_of(int))
|
||||
_log = attrs_extra.log('%s.CommitLogObserver' % __name__)
|
||||
|
||||
|
@@ -84,7 +84,7 @@ def subversion_log(project_url):
|
||||
return 'Not set up for Attract', 400
|
||||
|
||||
svn_server_url = attract_props['svn_url']
|
||||
log.info('Re-examining SVN server %s', svn_server_url)
|
||||
log.debug('Receiving commit from SVN server %s', svn_server_url)
|
||||
log_entry = subversion.create_log_entry(revision=revision,
|
||||
msg=commit_message,
|
||||
author=commit_author,
|
||||
|
Reference in New Issue
Block a user