]> www.average.org Git - loctrkd.git/blobdiff - test/common.py
rectifier: add PUB zmq socket
[loctrkd.git] / test / common.py
index ba4c12ade61f3bd19e42cbbdbd2646978377b363..284ca4d10c8509606dd6879f026c07f211104f83 100644 (file)
@@ -39,11 +39,13 @@ class TestWithServers(TestCase):
                 freeports.append(sk.getsockname()[1])
         _, self.tmpfilebase = mkstemp()
         self.conf = ConfigParser()
+        self.conf["common"] = {
+            "protocols": "zx303proto",
+        }
         self.conf["collector"] = {
             "port": str(freeports[0]),
             "publishurl": "ipc://" + self.tmpfilebase + ".pub",
             "listenurl": "ipc://" + self.tmpfilebase + ".pul",
-            "protocols": "gps303proto",
         }
         self.conf["storage"] = {
             "dbfn": self.tmpfilebase + ".storage.sqlite",
@@ -52,8 +54,9 @@ class TestWithServers(TestCase):
             "dbfn": self.tmpfilebase + ".opencellid.sqlite",
             "downloadurl": f"http://localhost:{freeports[2]}/test/262.csv.gz",
         }
-        self.conf["lookaside"] = {
-            "backend": "opencellid",
+        self.conf["rectifier"] = {
+            "lookaside": "opencellid",
+            "publishurl": "ipc://" + self.tmpfilebase + ".rect.pub",
         }
         self.conf["wsgateway"] = {
             "port": str(freeports[1]),
@@ -64,7 +67,7 @@ class TestWithServers(TestCase):
                 kwargs = {"handle_hibernate": False}
             else:
                 kwargs = {}
-            cls = import_module("gps303." + srvname, package=".")
+            cls = import_module("loctrkd." + srvname, package=".")
             if verbose:
                 cls.log.addHandler(StreamHandler(stderr))
                 cls.log.setLevel(DEBUG)
@@ -99,6 +102,7 @@ class TestWithServers(TestCase):
         for sfx in (
             "",
             ".pub",
+            ".rect.pub",
             ".pul",
             ".storage.sqlite",
             ".opencellid.sqlite",