tests for "Available" column (#648)

thanks to the anonymous author who posted this on trac
This commit is contained in:
Leif Ryge
2014-11-22 02:12:36 +00:00
committed by Daira Hopwood
parent 335c2ed06a
commit 336688165e
2 changed files with 9 additions and 1 deletions

View File

@ -332,6 +332,12 @@ class Server(unittest.TestCase):
self.failUnlessIn('maximum-immutable-share-size', sv1)
self.failUnlessIn('maximum-mutable-share-size', sv1)
def test_declares_available_space(self):
ss = self.create("test_declares_available_space")
ver = ss.remote_get_version()
sv1 = ver['http://allmydata.org/tahoe/protocols/storage/v1']
self.failUnlessIn('available-space', sv1)
def allocate(self, ss, storage_index, sharenums, size, canary=None):
renew_secret = hashutil.tagged_hash("blah", "%d" % self._lease_secret.next())
cancel_secret = hashutil.tagged_hash("blah", "%d" % self._lease_secret.next())