Commit d99cf84b authored by Guido van Rossum's avatar Guido van Rossum

Differentiate between read-only storage and read-only server in the

simple read-only tests.  (These tests pass.)
parent 9c995c9b
......@@ -334,8 +334,8 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)
def checkReadOnlyServer(self):
# Open a read-only client to a read-only server; stores fail
def checkReadOnlyStorage(self):
# Open a read-only client to a read-only *storage*; stores fail
# We don't want the read-write server created by setUp()
self.shutdownServer()
......@@ -349,6 +349,21 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)
def checkReadOnlyServer(self):
# Open a read-only client to a read-only *server*; stores fail
# We don't want the read-write server created by setUp()
self.shutdownServer()
self._servers = []
self._pids = []
# Start a read-only server
self._startServer(create=0, index=0, ro_svr=1)
# Start a read-only client
self._storage = self.openClientStorage(read_only=1)
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)
def checkReadOnlyFallbackWritable(self):
# Open a fallback client to a read-write server; stores succeed
......
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