fix test_vdrive (fixes #144)
It turns out that we actually have *two* files in our storage servers at the time that test_vdrive asserts things about the shares. I suppose that test_vdrive happens to pass on all other operating systems because the filesystem happens to return the right share as the first one in a "listdir()". The fix in this patch is slightly kludgey -- allow either share to pass -- but good enough.
This commit is contained in:
parent
7477430a58
commit
a18f7aa6d5
|
@ -639,13 +639,19 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
|
||||||
output = out.getvalue()
|
output = out.getvalue()
|
||||||
self.failUnlessEqual(rc, 0)
|
self.failUnlessEqual(rc, 0)
|
||||||
|
|
||||||
# we only upload a single file, so we can assert some things about
|
# We've uploaded only two files so we can assert some things
|
||||||
# its size and shares
|
# about the size and shares.
|
||||||
self.failUnless("size: %d\n" % len(self.data) in output)
|
self.failUnless("size: 112\n" in output or "size: 1500000\n" in output)
|
||||||
self.failUnless("num_segments: 1\n" in output)
|
if "size: 112\n" in output:
|
||||||
# segment_size is always a multiple of needed_shares
|
self.failUnless("num_segments: 1\n" in output)
|
||||||
self.failUnless("segment_size: 114\n" in output)
|
# segment_size is always a multiple of needed_shares
|
||||||
self.failUnless("total_shares: 10\n" in output)
|
self.failUnless("segment_size: 114\n" in output)
|
||||||
|
self.failUnless("total_shares: 10\n" in output)
|
||||||
|
else:
|
||||||
|
self.failUnless("num_segments: 2\n" in output)
|
||||||
|
# segment_size is always a multiple of needed_shares
|
||||||
|
self.failUnless("segment_size: 1048578\n" in output)
|
||||||
|
self.failUnless("total_shares: 10\n" in output)
|
||||||
# keys which are supposed to be present
|
# keys which are supposed to be present
|
||||||
for key in ("size", "num_segments", "segment_size",
|
for key in ("size", "num_segments", "segment_size",
|
||||||
"needed_shares", "total_shares",
|
"needed_shares", "total_shares",
|
||||||
|
|
Loading…
Reference in New Issue