mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
WIP 1101 Add verbose flag to check command
This commit adds the verbose option to the command 'check' so that if you choose verbose, you do not get an error message. The full verbose output is not yet implemented. When verbose is fully supported, the option should return more detailed output. modified: src/allmydata/scripts/cli.py modified: src/allmydata/test/cli/test_check.py
This commit is contained in:
parent
d55b8f1e53
commit
fd28160421
@ -445,6 +445,7 @@ class CheckOptions(FileStoreOptions):
|
|||||||
("verify", None, "Verify all hashes, instead of merely querying share presence."),
|
("verify", None, "Verify all hashes, instead of merely querying share presence."),
|
||||||
("repair", None, "Automatically repair any problems found."),
|
("repair", None, "Automatically repair any problems found."),
|
||||||
("add-lease", None, "Add/renew lease on all shares."),
|
("add-lease", None, "Add/renew lease on all shares."),
|
||||||
|
("verbose", None, "Provide verbose output (unimplemented)."),
|
||||||
]
|
]
|
||||||
def parseArgs(self, *locations):
|
def parseArgs(self, *locations):
|
||||||
self.locations = list(map(argv_to_unicode, locations))
|
self.locations = list(map(argv_to_unicode, locations))
|
||||||
|
@ -151,6 +151,18 @@ class Check(GridTestMixin, CLITestMixin, unittest.TestCase):
|
|||||||
self.failIf(" corrupt shares:" in lines, out)
|
self.failIf(" corrupt shares:" in lines, out)
|
||||||
d.addCallback(_check5)
|
d.addCallback(_check5)
|
||||||
|
|
||||||
|
# Testing verbose option
|
||||||
|
d.addCallback(lambda ign: self.do_cli("check", "--verbose", self.uri))
|
||||||
|
def _check6(args):
|
||||||
|
(rc, out, err) = args
|
||||||
|
self.assertEqual(len(err), 0, err)
|
||||||
|
self.failUnlessReallyEqual(rc, 0)
|
||||||
|
lines = out.splitlines()
|
||||||
|
self.failUnless("Summary: Healthy" in lines, out)
|
||||||
|
self.failUnless(" good-shares: 10 (encoding is 3-of-10)" in lines, out)
|
||||||
|
d.addCallback(_check1)
|
||||||
|
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_deep_check(self):
|
def test_deep_check(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user