##// END OF EJS Templates
feat(configs): deprecared old hooks protocol and ssh wrapper....
super-admin -
r5496:cab50adf default
parent child Browse files
Show More
@@ -624,7 +624,8 b' vcs.scm_app_implementation = http'
624 ; Push/Pull operations hooks protocol, available options are:
624 ; Push/Pull operations hooks protocol, available options are:
625 ; `http` - use http-rpc backend (default)
625 ; `http` - use http-rpc backend (default)
626 ; `celery` - use celery based hooks
626 ; `celery` - use celery based hooks
627 vcs.hooks.protocol = http
627 #DEPRECATED:vcs.hooks.protocol = http
628 vcs.hooks.protocol.v2 = celery
628
629
629 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
630 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
630 ; accessible via network.
631 ; accessible via network.
@@ -592,7 +592,8 b' vcs.scm_app_implementation = http'
592 ; Push/Pull operations hooks protocol, available options are:
592 ; Push/Pull operations hooks protocol, available options are:
593 ; `http` - use http-rpc backend (default)
593 ; `http` - use http-rpc backend (default)
594 ; `celery` - use celery based hooks
594 ; `celery` - use celery based hooks
595 vcs.hooks.protocol = http
595 #DEPRECATED:vcs.hooks.protocol = http
596 vcs.hooks.protocol.v2 = celery
596
597
597 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
598 ; Host on which this instance is listening for hooks. vcsserver will call this host to pull/push hooks so it should be
598 ; accessible via network.
599 ; accessible via network.
@@ -157,7 +157,7 b' class SshVcsServer(object):'
157 return exit_code, action == "push"
157 return exit_code, action == "push"
158
158
159 def run(self, tunnel_extras=None):
159 def run(self, tunnel_extras=None):
160 self.hooks_protocol = self.settings['vcs.hooks.protocol']
160 self.hooks_protocol = self.settings['vcs.hooks.protocol.v2']
161 tunnel_extras = tunnel_extras or {}
161 tunnel_extras = tunnel_extras or {}
162 extras = {}
162 extras = {}
163 extras.update(tunnel_extras)
163 extras.update(tunnel_extras)
@@ -32,7 +32,7 b' class GitServerCreator(object):'
32 config_data = {
32 config_data = {
33 'app:main': {
33 'app:main': {
34 'ssh.executable.git': git_path,
34 'ssh.executable.git': git_path,
35 'vcs.hooks.protocol': 'http',
35 'vcs.hooks.protocol.v2': 'celery',
36 }
36 }
37 }
37 }
38 repo_name = 'test_git'
38 repo_name = 'test_git'
@@ -31,7 +31,7 b' class MercurialServerCreator(object):'
31 config_data = {
31 config_data = {
32 'app:main': {
32 'app:main': {
33 'ssh.executable.hg': hg_path,
33 'ssh.executable.hg': hg_path,
34 'vcs.hooks.protocol': 'http',
34 'vcs.hooks.protocol.v2': 'celery',
35 }
35 }
36 }
36 }
37 repo_name = 'test_hg'
37 repo_name = 'test_hg'
@@ -29,7 +29,7 b' class SubversionServerCreator(object):'
29 config_data = {
29 config_data = {
30 'app:main': {
30 'app:main': {
31 'ssh.executable.svn': svn_path,
31 'ssh.executable.svn': svn_path,
32 'vcs.hooks.protocol': 'http',
32 'vcs.hooks.protocol.v2': 'celery',
33 }
33 }
34 }
34 }
35 repo_name = 'test-svn'
35 repo_name = 'test-svn'
@@ -106,7 +106,7 b' def sanitize_settings_and_apply_defaults'
106 settings_maker.make_setting('vcs.svn.redis_conn', 'redis://redis:6379/0')
106 settings_maker.make_setting('vcs.svn.redis_conn', 'redis://redis:6379/0')
107 settings_maker.make_setting('vcs.svn.proxy.enabled', True, parser='bool')
107 settings_maker.make_setting('vcs.svn.proxy.enabled', True, parser='bool')
108 settings_maker.make_setting('vcs.svn.proxy.host', 'http://svn:8090', parser='string')
108 settings_maker.make_setting('vcs.svn.proxy.host', 'http://svn:8090', parser='string')
109 settings_maker.make_setting('vcs.hooks.protocol', 'http')
109 settings_maker.make_setting('vcs.hooks.protocol.v2', 'celery')
110 settings_maker.make_setting('vcs.hooks.host', '*')
110 settings_maker.make_setting('vcs.hooks.host', '*')
111 settings_maker.make_setting('vcs.scm_app_implementation', 'http')
111 settings_maker.make_setting('vcs.scm_app_implementation', 'http')
112 settings_maker.make_setting('vcs.server', '')
112 settings_maker.make_setting('vcs.server', '')
@@ -35,7 +35,7 b' def configure_vcs(config):'
35 'svn': 'rhodecode.lib.vcs.backends.svn.SubversionRepository',
35 'svn': 'rhodecode.lib.vcs.backends.svn.SubversionRepository',
36 }
36 }
37
37
38 conf.settings.HOOKS_PROTOCOL = config['vcs.hooks.protocol']
38 conf.settings.HOOKS_PROTOCOL = config['vcs.hooks.protocol.v2']
39 conf.settings.HOOKS_HOST = config['vcs.hooks.host']
39 conf.settings.HOOKS_HOST = config['vcs.hooks.host']
40 conf.settings.DEFAULT_ENCODINGS = config['default_encoding']
40 conf.settings.DEFAULT_ENCODINGS = config['default_encoding']
41 conf.settings.ALIASES[:] = config['vcs.backends']
41 conf.settings.ALIASES[:] = config['vcs.backends']
@@ -117,7 +117,7 b' class TestSanitizeVcsSettings(object):'
117
117
118 _string_funcs = [
118 _string_funcs = [
119 ('vcs.svn.compatible_version', ''),
119 ('vcs.svn.compatible_version', ''),
120 ('vcs.hooks.protocol', 'http'),
120 ('vcs.hooks.protocol.v2', 'celery'),
121 ('vcs.hooks.host', '*'),
121 ('vcs.hooks.host', '*'),
122 ('vcs.scm_app_implementation', 'http'),
122 ('vcs.scm_app_implementation', 'http'),
123 ('vcs.server', ''),
123 ('vcs.server', ''),
@@ -110,7 +110,7 b' def ini_config(request, tmpdir_factory, '
110 'vcs.server.protocol': 'http',
110 'vcs.server.protocol': 'http',
111 'vcs.scm_app_implementation': 'http',
111 'vcs.scm_app_implementation': 'http',
112 'vcs.svn.proxy.enabled': 'true',
112 'vcs.svn.proxy.enabled': 'true',
113 'vcs.hooks.protocol': 'http',
113 'vcs.hooks.protocol.v2': 'celery',
114 'vcs.hooks.host': '*',
114 'vcs.hooks.host': '*',
115 'repo_store.path': TESTS_TMP_PATH,
115 'repo_store.path': TESTS_TMP_PATH,
116 'app.service_api.token': 'service_secret_token',
116 'app.service_api.token': 'service_secret_token',
@@ -399,7 +399,7 b' class TestGenerateVcsResponse(object):'
399 def call_controller_with_response_body(self, response_body):
399 def call_controller_with_response_body(self, response_body):
400 settings = {
400 settings = {
401 'base_path': 'fake_base_path',
401 'base_path': 'fake_base_path',
402 'vcs.hooks.protocol': 'http',
402 'vcs.hooks.protocol.v2': 'celery',
403 'vcs.hooks.direct_calls': False,
403 'vcs.hooks.direct_calls': False,
404 }
404 }
405 registry = AttributeDict()
405 registry = AttributeDict()
@@ -449,7 +449,7 b' class TestPullRequestModel(object):'
449 @pytest.mark.usefixtures('config_stub')
449 @pytest.mark.usefixtures('config_stub')
450 class TestIntegrationMerge(object):
450 class TestIntegrationMerge(object):
451 @pytest.mark.parametrize('extra_config', (
451 @pytest.mark.parametrize('extra_config', (
452 {'vcs.hooks.protocol': 'http', 'vcs.hooks.direct_calls': False},
452 {'vcs.hooks.protocol.v2': 'celery', 'vcs.hooks.direct_calls': False},
453 ))
453 ))
454 def test_merge_triggers_push_hooks(
454 def test_merge_triggers_push_hooks(
455 self, pr_util, user_admin, capture_rcextensions, merge_extras,
455 self, pr_util, user_admin, capture_rcextensions, merge_extras,
General Comments 0
You need to be logged in to leave comments. Login now