[PATCH] test samba-tool --help

Andrew Bartlett abartlet at samba.org
Mon Dec 18 08:13:47 UTC 2017


On Mon, 2017-12-18 at 17:37 +1300, Douglas Bagnall via samba-technical
wrote:
> Running `samba-tool --help` lists a number of subcommands, and if you
> recurse into the help tree with a subcommand like so
> 
> $ bin/samba-tool spn --help
> 
> you are given a list of sub-subcommands.
> 
> This patch climbs the samba-tool --help tree and checks that each call
> succeeds. Incidentally, there are 109 nodes on the tree.
> 
> Why bother, you are probably asking, given this test is doing very
> little and exercising the same bit of code 109 times. Well, there are
> two reasons:
> 
> 1) I want to change some things in the help code.
> 
> 2) as far as I can tell, some branches (like "spn") are not tested in
> any way. This test will at least catch syntax errors.

G'Day Douglas,

This looks good, but why didn't you use self.check_output() from BlackBoxTestCase?

This finds the BINDIR without needing the environment by using the python file location.

Fix that up and a review will be easy to obtain :-)

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list