From 362f2040757fb8c3cf025cea862995eef567998d Mon Sep 17 00:00:00 2001 From: Kevan Carstensen Date: Sat, 17 Oct 2009 18:30:13 -0700 Subject: [PATCH] Alter NoNetworkGrid to allow the creation of readonly servers for testing purposes. --- src/allmydata/test/no_network.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/allmydata/test/no_network.py b/src/allmydata/test/no_network.py index 1487576f..801714e9 100644 --- a/src/allmydata/test/no_network.py +++ b/src/allmydata/test/no_network.py @@ -216,12 +216,13 @@ class NoNetworkGrid(service.MultiService): c.setServiceParent(self) self.clients.append(c) - def make_server(self, i): + def make_server(self, i, readonly=False): serverid = hashutil.tagged_hash("serverid", str(i))[:20] serverdir = os.path.join(self.basedir, "servers", idlib.shortnodeid_b2a(serverid)) fileutil.make_dirs(serverdir) - ss = StorageServer(serverdir, serverid, stats_provider=SimpleStats()) + ss = StorageServer(serverdir, serverid, stats_provider=SimpleStats(), + readonly_storage=readonly) return ss def add_server(self, i, ss): -- 2.45.2