From: Brian Warner Date: Wed, 3 Dec 2008 02:41:02 +0000 (-0700) Subject: test_storage.py: more windows-vs-readonly-storage fixes X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/simplejson/frontends/FTP-and-SFTP.txt?a=commitdiff_plain;h=6958b7fa909f5e3e973d4645bbe258d4779f5a8e;p=tahoe-lafs%2Ftahoe-lafs.git test_storage.py: more windows-vs-readonly-storage fixes --- diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 043dd4dd..012e003c 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -575,7 +575,11 @@ class Server(unittest.TestCase): stats = ss.get_stats() self.failUnlessEqual(stats["storage_server.accepting_immutable_shares"], False) - self.failUnlessEqual(stats["storage_server.disk_avail"], 0) + if "storage_server.disk_avail" in stats: + # windows does not have os.statvfs, so it doesn't give us disk + # stats. But if there are stats, readonly_storage means + # disk_avail=0 + self.failUnlessEqual(stats["storage_server.disk_avail"], 0) def test_discard(self): # discard is really only used for other tests, but we test it anyways