From 5103bf8148bdbad410dd2c9698b11d925045556c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 5 Feb 2008 20:28:59 -0700 Subject: [PATCH] storage: change service name from 'storageserver' to 'storage' --- src/allmydata/storage.py | 2 +- src/allmydata/test/test_client.py | 15 ++++++--------- src/allmydata/test/test_system.py | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py index c50aa58a..d720ef9b 100644 --- a/src/allmydata/storage.py +++ b/src/allmydata/storage.py @@ -668,7 +668,7 @@ def create_mutable_sharefile(filename, my_nodeid, write_enabler, parent): class StorageServer(service.MultiService, Referenceable): implements(RIStorageServer, IStatsProducer) - name = 'storageserver' + name = 'storage' # we're pretty narrow-minded right now OLDEST_SUPPORTED_VERSION = allmydata.__version__ diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index 2cab1d49..6f2e2f5b 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -53,8 +53,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("1000") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, - 1000) + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 1000) def test_sizelimit_2(self): basedir = "client.Basic.test_sizelimit_2" @@ -63,8 +62,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("10K") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, - 10*1000) + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 10*1000) def test_sizelimit_3(self): basedir = "client.Basic.test_sizelimit_3" @@ -73,7 +71,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("5mB") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 5*1000*1000) def test_sizelimit_4(self): @@ -83,7 +81,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("78Gb") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 78*1000*1000*1000) def test_sizelimit_bad(self): @@ -93,8 +91,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("bogus") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, - None) + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, None) def _permute(self, c, key): return [ peerid @@ -127,7 +124,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "introducer.furl"), "w").write("") open(os.path.join(basedir, "vdrive.furl"), "w").write("") c = client.Client(basedir) - ss = c.getServiceNamed("storageserver") + ss = c.getServiceNamed("storage") mine, oldest = ss.remote_get_versions() self.failUnlessEqual(mine, str(allmydata.__version__)) self.failIfEqual(str(allmydata.__version__), "unknown") diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 15a7c62c..3834696b 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -288,7 +288,7 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase): add_to_sparent=True)) def _added(extra_node): self.extra_node = extra_node - extra_node.getServiceNamed("storageserver").sizelimit = 0 + extra_node.getServiceNamed("storage").sizelimit = 0 d.addCallback(_added) HELPER_DATA = "Data that needs help to upload" * 1000 -- 2.45.2