Commit 5699d09c authored by Łukasz Nowak's avatar Łukasz Nowak

test: Force use LOCAL_IPV4 and "randomize" ports

parent 67bd60ea
...@@ -124,7 +124,7 @@ class KedifaIntegrationTest(unittest.TestCase): ...@@ -124,7 +124,7 @@ class KedifaIntegrationTest(unittest.TestCase):
self.pem = certificate_pem + key_pem self.pem = certificate_pem + key_pem
def setUpCaucase(self): def setUpCaucase(self):
ip, port = '::1', 8080 ip, port = os.environ['LOCAL_IPV6'], 15080
self.caucased = os.path.join(self.testdir, 'caucased') self.caucased = os.path.join(self.testdir, 'caucased')
caucase_db = os.path.join(self.caucased, 'caucase.sqlite') caucase_db = os.path.join(self.caucased, 'caucase.sqlite')
self.caucase_service = os.path.join(self.testdir, 'service') self.caucase_service = os.path.join(self.testdir, 'service')
...@@ -201,7 +201,7 @@ class KedifaIntegrationTest(unittest.TestCase): ...@@ -201,7 +201,7 @@ class KedifaIntegrationTest(unittest.TestCase):
def setUpKedifa(self, ip): def setUpKedifa(self, ip):
self.db = os.path.join(self.testdir, 'pocket.sqlite') self.db = os.path.join(self.testdir, 'pocket.sqlite')
self.pidfile = os.path.join(self.testdir, 'kedifa.pid') self.pidfile = os.path.join(self.testdir, 'kedifa.pid')
port = '6789' port = '16080'
self.kedifa_runtime = multiprocessing.Process( self.kedifa_runtime = multiprocessing.Process(
target=http, target=http,
args=( args=(
...@@ -288,7 +288,7 @@ class KedifaIntegrationTest(unittest.TestCase): ...@@ -288,7 +288,7 @@ class KedifaIntegrationTest(unittest.TestCase):
self.addCleanup(cleanTestDir) self.addCleanup(cleanTestDir)
self.setUpCaucase() self.setUpCaucase()
self.kedifa_ip = '::1' self.kedifa_ip = os.environ['LOCAL_IPV6']
self.setUpKedifaKey(self.kedifa_ip) self.setUpKedifaKey(self.kedifa_ip)
self.setUpClientKey() self.setUpClientKey()
self.setUpKedifa(self.kedifa_ip) self.setUpKedifa(self.kedifa_ip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment