Commit 04cc7d3f authored by Iustin Pop's avatar Iustin Pop
Browse files

Extend hroller shell tests



Currently only --help and --version are tested; the patch extends this
with testing parsing of an empty cluster, of a cluster with one group,
and other command line behaviours.

It also adds testing for --help-completion for all htools binaries.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent dccf6eaf
group-01|fake-uuid-01|preferred|
|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,12|diskless,file,sharedfile,plain,blockdev,drbd,rbd,ext|4.0|32.0
group-01|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,12|diskless,file,sharedfile,plain,blockdev,drbd,rbd,ext|4.0|32.0
......@@ -3,27 +3,41 @@
>>>= 0
./htest/hail --help
>>>= 0
./htest/hail --help-completion
>>>= 0
./htest/hbal --version
>>>= 0
./htest/hbal --help
>>>= 0
./htest/hbal --help-completion
>>>= 0
./htest/hspace --version
>>>= 0
./htest/hspace --help
>>>= 0
./htest/hspace --help-completion
>>>= 0
./htest/hscan --version
>>>= 0
./htest/hscan --help
>>>= 0
./htest/hscan --help-completion
>>>= 0
./htest/hinfo --version
>>>= 0
./htest/hinfo --help
>>>= 0
./htest/hinfo --help-completion
>>>= 0
./htest/hcheck --version
>>>= 0
./htest/hcheck --help
>>>= 0
./htest/hcheck --help-completion
>>>= 0
./htest/hroller --version
>>>= 0
./htest/hroller --help
>>>= 0
./htest/hroller --help-completion
>>>= 0
......@@ -22,6 +22,10 @@
./htest/hcheck --no-such-option
>>>= 2
# invalid option test
./htest/hroller --no-such-option
>>>= 2
# extra arguments
./htest/hspace unexpected-argument
>>>2
......@@ -42,3 +46,14 @@ Error: This program doesn't take any arguments.
>>>2
Error: This program doesn't take any arguments.
>>>=1
./htest/hroller unexpected-argument
>>>2
Error: This program doesn't take any arguments.
>>>=1
# hroller fails to build a graph for an empty cluster
./htest/hroller -t$TESTDATA_DIR/empty-cluster.data
>>>2
Error: Cannot create node graph
>>>=1
......@@ -14,6 +14,10 @@
./htest/hinfo
>>>= 1
# hroller no backend
./htest/hroller
>>>= 1
# hbal multiple backends
./htest/hbal -t /dev/null -m localhost
>>>2
......
......@@ -27,3 +27,11 @@
./htest/hcheck -t$T/simu-onegroup.tiered --machine-readable
>>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/
>>>= 0
# hroller should be able to print the solution
./htest/hroller -t$T/simu-onegroup.tiered
>>>= 0
# hroller should be able to print the solution, in verbose mode as well
./htest/hroller -t$T/simu-onegroup.tiered -v -v
>>>= 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment