From fb5b1506a2344271ad73cff454860a5f09e05ff9 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Tue, 20 Sep 2016 14:01:42 +0200 Subject: [PATCH] tests: Fix --without-vcsserver parameter Ensuring now that we always disable the vcsserver auto start for the test suite, since the test suite bootstraps its own vcsserver process. Also enhanced TestINI. --- rhodecode/tests/fixture.py | 4 ++-- rhodecode/tests/pylons_plugin.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rhodecode/tests/fixture.py b/rhodecode/tests/fixture.py index 2b208125..4da10541 100644 --- a/rhodecode/tests/fixture.py +++ b/rhodecode/tests/fixture.py @@ -76,8 +76,8 @@ class TestINI(object): for data in self.ini_params: section, ini_params = data.items()[0] - key, val = ini_params.items()[0] - config[section][key] = val + for key, val in ini_params.items(): + config[section][key] = val with tempfile.NamedTemporaryFile( prefix=self.new_path_prefix, suffix='.ini', dir=self._dir, delete=False) as new_ini_file: diff --git a/rhodecode/tests/pylons_plugin.py b/rhodecode/tests/pylons_plugin.py index 3266941c..fc430817 100644 --- a/rhodecode/tests/pylons_plugin.py +++ b/rhodecode/tests/pylons_plugin.py @@ -283,7 +283,14 @@ def pylons_config(request, tmpdir_factory, rcserver_port, vcsserver_port): overrides = [ {'server:main': {'port': rcserver_port}}, - {'app:main': {'vcs.server': 'localhost:%s' % vcsserver_port}}] + {'app:main': { + 'vcs.server': 'localhost:%s' % vcsserver_port, + # johbo: We will always start the VCSServer on our own based on the + # fixtures of the test cases. For the test run it must always be + # off in the INI file. + 'vcs.start_server': 'false', + }}, + ] if _use_vcs_http_server(request.config): overrides.append({'app:main': {'vcs.server.protocol': 'http'}})