Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
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 @@ ...@@ -3,27 +3,41 @@
>>>= 0 >>>= 0
./htest/hail --help ./htest/hail --help
>>>= 0 >>>= 0
./htest/hail --help-completion
>>>= 0
./htest/hbal --version ./htest/hbal --version
>>>= 0 >>>= 0
./htest/hbal --help ./htest/hbal --help
>>>= 0 >>>= 0
./htest/hbal --help-completion
>>>= 0
./htest/hspace --version ./htest/hspace --version
>>>= 0 >>>= 0
./htest/hspace --help ./htest/hspace --help
>>>= 0 >>>= 0
./htest/hspace --help-completion
>>>= 0
./htest/hscan --version ./htest/hscan --version
>>>= 0 >>>= 0
./htest/hscan --help ./htest/hscan --help
>>>= 0 >>>= 0
./htest/hscan --help-completion
>>>= 0
./htest/hinfo --version ./htest/hinfo --version
>>>= 0 >>>= 0
./htest/hinfo --help ./htest/hinfo --help
>>>= 0 >>>= 0
./htest/hinfo --help-completion
>>>= 0
./htest/hcheck --version ./htest/hcheck --version
>>>= 0 >>>= 0
./htest/hcheck --help ./htest/hcheck --help
>>>= 0 >>>= 0
./htest/hcheck --help-completion
>>>= 0
./htest/hroller --version ./htest/hroller --version
>>>= 0 >>>= 0
./htest/hroller --help ./htest/hroller --help
>>>= 0 >>>= 0
./htest/hroller --help-completion
>>>= 0
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
./htest/hcheck --no-such-option ./htest/hcheck --no-such-option
>>>= 2 >>>= 2
# invalid option test
./htest/hroller --no-such-option
>>>= 2
# extra arguments # extra arguments
./htest/hspace unexpected-argument ./htest/hspace unexpected-argument
>>>2 >>>2
...@@ -42,3 +46,14 @@ Error: This program doesn't take any arguments. ...@@ -42,3 +46,14 @@ Error: This program doesn't take any arguments.
>>>2 >>>2
Error: This program doesn't take any arguments. Error: This program doesn't take any arguments.
>>>=1 >>>=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 @@ ...@@ -14,6 +14,10 @@
./htest/hinfo ./htest/hinfo
>>>= 1 >>>= 1
# hroller no backend
./htest/hroller
>>>= 1
# hbal multiple backends # hbal multiple backends
./htest/hbal -t /dev/null -m localhost ./htest/hbal -t /dev/null -m localhost
>>>2 >>>2
......
...@@ -27,3 +27,11 @@ ...@@ -27,3 +27,11 @@
./htest/hcheck -t$T/simu-onegroup.tiered --machine-readable ./htest/hcheck -t$T/simu-onegroup.tiered --machine-readable
>>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/ >>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/
>>>= 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment