[Zodb-checkins] CVS: ZODB3/ZEO/tests - testConnection.py:1.3

Barry Warsaw barry@wooz.org
Tue, 10 Dec 2002 16:48:24 -0500


Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv20245

Modified Files:
	testConnection.py 
Log Message:
Convert the ZEO test framework to use StorageTypes and ZConfig to
create the specific storage instances.  This lets us easily generalize
the tests (the Unix ones at least ;) to use the Berkeley Full storage.


=== ZODB3/ZEO/tests/testConnection.py 1.2 => 1.3 ===
--- ZODB3/ZEO/tests/testConnection.py:1.2	Fri Oct  4 20:35:25 2002
+++ ZODB3/ZEO/tests/testConnection.py	Tue Dec 10 16:48:23 2002
@@ -42,8 +42,17 @@
                  (create, index, read_only))
         path = "%s.%d" % (self.file, index)
         addr = self.addr[index]
-        pid, server = forker.start_zeo_server(
-            'FileStorage', (path, create, read_only), addr, ro_svr)
+        conf = """\
+        <Storage>
+            type FileStorage
+            file_name %s
+            create %s
+            read_only %s
+        </Storage>""" % (path,
+                         create and 'yes' or 'no',
+                         read_only and 'yes' or 'no')
+
+        pid, server = forker.start_zeo_server(conf, addr, ro_svr)
         self._pids.append(pid)
         self._servers.append(server)