# root/subdir/
# root/subdir/file1
# root/subdir/link -> root
+ # root/rodir
d = self.client.create_empty_dirnode()
def _created_root(rootnode):
self._rootnode = rootnode
self._subdir = subdir
d = subdir.add_file(u"file1", upload.Data("data", None))
d.addCallback(lambda res: subdir.set_node(u"link", self._rootnode))
+ d.addCallback(lambda res: self.client.create_empty_dirnode())
+ d.addCallback(lambda dn:
+ self._rootnode.set_uri(u"rodir",
+ dn.get_readonly_uri()))
return d
d.addCallback(_created_subdir)
def _done(res):
self.failUnless(IDeepCheckResults.providedBy(r))
c = r.get_counters()
self.failUnlessEqual(c,
- {"count-objects-checked": 3,
- "count-objects-healthy": 3,
+ {"count-objects-checked": 4,
+ "count-objects-healthy": 4,
"count-objects-unhealthy": 0,
"count-objects-unrecoverable": 0,
"count-corrupt-shares": 0,
})
self.failIf(r.get_corrupt_shares())
- self.failUnlessEqual(len(r.get_all_results()), 3)
+ self.failUnlessEqual(len(r.get_all_results()), 4)
d.addCallback(_check_results)
return d
self.failUnless(IDeepCheckAndRepairResults.providedBy(r))
c = r.get_counters()
self.failUnlessEqual(c,
- {"count-objects-checked": 3,
- "count-objects-healthy-pre-repair": 3,
+ {"count-objects-checked": 4,
+ "count-objects-healthy-pre-repair": 4,
"count-objects-unhealthy-pre-repair": 0,
"count-objects-unrecoverable-pre-repair": 0,
"count-corrupt-shares-pre-repair": 0,
- "count-objects-healthy-post-repair": 3,
+ "count-objects-healthy-post-repair": 4,
"count-objects-unhealthy-post-repair": 0,
"count-objects-unrecoverable-post-repair": 0,
"count-corrupt-shares-post-repair": 0,
})
self.failIf(r.get_corrupt_shares())
self.failIf(r.get_remaining_corrupt_shares())
- self.failUnlessEqual(len(r.get_all_results()), 3)
+ self.failUnlessEqual(len(r.get_all_results()), 4)
d.addCallback(_check_results)
return d
def _check_results(r):
c = r.get_counters()
self.failUnlessEqual(c,
- {"count-objects-checked": 3,
- "count-objects-healthy": 2,
+ {"count-objects-checked": 4,
+ "count-objects-healthy": 3,
"count-objects-unhealthy": 1,
"count-objects-unrecoverable": 0,
"count-corrupt-shares": 0,