From 7b18a69a642f9b63ae409be4264656a6b4ab2590 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sep 24 2018 08:42:11 +0000 Subject: Make sure repoSpanner tests can run simultaneous py2 and py3 This makes sure that the py2 and py3 test runs pick different ports, which makes sure that if they are run at the same time, they don't interfere with one another. Signed-off-by: Patrick Uiterwijk --- diff --git a/tests/__init__.py b/tests/__init__.py index ba00f40..a6b0822 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -385,7 +385,7 @@ class SimplePagureTest(unittest.TestCase): 'global_path': tests_state["path"], 'authbackend': 'gitolite3', - 'repospanner_gitport': '8443', + 'repospanner_gitport': str(8443 + sys.version_info.major), 'repospanner_new_repo': 'None', 'repospanner_admin_override': 'False', 'repospanner_new_fork': 'True', diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py index 81ac68a..c3b6b9d 100644 --- a/tests/test_pagure_repospanner.py +++ b/tests/test_pagure_repospanner.py @@ -154,8 +154,8 @@ class PagureRepoSpannerTests(tests.Modeltests): configvals = { 'path': self.path, 'crosspath': tests.tests_state["path"], - 'gitport': 8443, - 'rpcport': 8444, + 'gitport': 8443 + sys.version_info.major, + 'rpcport': 8445 + sys.version_info.major, 'codepath': codepath, 'hookrunner_bin': hookrunbin, }