for 'to_name'. This is unconditional and will replace any child already
present under 'to_name', akin to 'mv -f' in unix parlance.
+
+ POST $URL
+ t=check
+
+ This triggers the FileChecker to determine the current "health" of the
+ given file, by counting how many shares are available. The results will be
+ displayed on the directory page containing this file.
+
+
5. debugging and testing features
GET $URL?t=download&localfile=$LOCALPATH
d.addCallback(self.failUnlessIsEmptyJSON)
return d
+ def test_POST_check(self):
+ d = self.POST(self.public_url + "/foo", t="check", name="bar.txt")
+ def _done(res):
+ # this returns a string form of the results, which are probably
+ # None since we're using fake filenodes.
+ # TODO: verify that the check actually happened, by changing
+ # FakeCHKFileNode to count how many times .check() has been
+ # called.
+ pass
+ d.addCallback(_done)
+ return d
+
def test_XMLRPC(self):
raise unittest.SkipTest("The XML-RPC interface is not yet implemented. Please use the RESTful interface (documented in docs/webapi.txt) for now.")
pass
d2 = child_node.check()
def _done(res):
log.msg("checked %s, results %s" % (child_node, res))
- return res
+ return str(res)
d2.addCallback(_done)
return d2
d.addCallback(_got_child)