##// END OF EJS Templates
pytest: Use http as default backend in pytest configuration.
Martin Bornhold -
r969:63a8933a default
parent child Browse files
Show More
@@ -1,9 +1,9 b''
1 [pytest]
1 [pytest]
2 testpaths = ./rhodecode
2 testpaths = ./rhodecode
3 pylons_config = test.ini
3 pylons_config = test.ini
4 vcsserver_protocol = pyro4
4 vcsserver_protocol = http
5 vcsserver_config = rhodecode/tests/vcsserver.ini
5 vcsserver_config_pyro4 = rhodecode/tests/vcsserver_pyro4.ini
6 vcsserver_config_http = rhodecode/tests/vcsserver_pyramid.ini
6 vcsserver_config_http = rhodecode/tests/vcsserver_http.ini
7 norecursedirs = tests/scripts
7 norecursedirs = tests/scripts
8 addopts = -k "not _BaseTest"
8 addopts = -k "not _BaseTest"
9 markers =
9 markers =
@@ -68,7 +68,7 b' def pytest_addoption(parser):'
68 '--without-vcsserver', dest='with_vcsserver', action='store_false',
68 '--without-vcsserver', dest='with_vcsserver', action='store_false',
69 help="Do not start the VCSServer in a background process.")
69 help="Do not start the VCSServer in a background process.")
70 vcsgroup.addoption(
70 vcsgroup.addoption(
71 '--with-vcsserver', dest='vcsserver_config',
71 '--with-vcsserver', dest='vcsserver_config_pyro4',
72 help="Start the VCSServer with the specified config file.")
72 help="Start the VCSServer with the specified config file.")
73 vcsgroup.addoption(
73 vcsgroup.addoption(
74 '--with-vcsserver-http', dest='vcsserver_config_http',
74 '--with-vcsserver-http', dest='vcsserver_config_http',
@@ -91,7 +91,7 b' def pytest_addoption(parser):'
91 "against an already running server and random ports cause "
91 "against an already running server and random ports cause "
92 "trouble."))
92 "trouble."))
93 parser.addini(
93 parser.addini(
94 'vcsserver_config',
94 'vcsserver_config_pyro4',
95 "Start the VCSServer with the specified config file.")
95 "Start the VCSServer with the specified config file.")
96 parser.addini(
96 parser.addini(
97 'vcsserver_config_http',
97 'vcsserver_config_http',
@@ -151,7 +151,7 b' def vcsserver_factory(tmpdir_factory):'
151 overrides.append(platform_override)
151 overrides.append(platform_override)
152
152
153 option_name = (
153 option_name = (
154 'vcsserver_config_http' if use_http else 'vcsserver_config')
154 'vcsserver_config_http' if use_http else 'vcsserver_config_pyro4')
155 override_option_name = 'vcsserver_config_override'
155 override_option_name = 'vcsserver_config_override'
156 config_file = get_config(
156 config_file = get_config(
157 request.config, option_name=option_name,
157 request.config, option_name=option_name,
@@ -183,7 +183,7 b' def _use_vcs_http_server(config):'
183 protocol = (
183 protocol = (
184 config.getoption(protocol_option) or
184 config.getoption(protocol_option) or
185 config.getini(protocol_option) or
185 config.getini(protocol_option) or
186 'pyro4')
186 'http')
187 return protocol == 'http'
187 return protocol == 'http'
188
188
189
189
General Comments 0
You need to be logged in to leave comments. Login now