Changeset fd28160 in trunk


Ignore:
Timestamp:
2024-11-04T16:31:45Z (5 months ago)
Author:
JW Jacobson <116485484+jwjacobson@…>
Children:
0c76148
Parents:
d55b8f1
Message:

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

Location:
src/allmydata
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/scripts/cli.py

    rd55b8f1 rfd28160  
    446446        ("repair", None, "Automatically repair any problems found."),
    447447        ("add-lease", None, "Add/renew lease on all shares."),
     448        ("verbose", None, "Provide verbose output (unimplemented)."),
    448449        ]
    449450    def parseArgs(self, *locations):
  • TabularUnified src/allmydata/test/cli/test_check.py

    rd55b8f1 rfd28160  
    152152        d.addCallback(_check5)
    153153
     154        # Testing verbose option
     155        d.addCallback(lambda ign: self.do_cli("check", "--verbose", self.uri))
     156        def _check6(args):
     157            (rc, out, err) = args
     158            self.assertEqual(len(err), 0, err)
     159            self.failUnlessReallyEqual(rc, 0)
     160            lines = out.splitlines()
     161            self.failUnless("Summary: Healthy" in lines, out)
     162            self.failUnless(" good-shares: 10 (encoding is 3-of-10)" in lines, out)
     163        d.addCallback(_check1)
     164
     165
    154166        return d
    155167
Note: See TracChangeset for help on using the changeset viewer.