From 6958b7fa909f5e3e973d4645bbe258d4779f5a8e Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Tue, 2 Dec 2008 19:41:02 -0700
Subject: [PATCH] test_storage.py: more windows-vs-readonly-storage fixes

---
 src/allmydata/test/test_storage.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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
-- 
2.45.2