Signed-off-by: Oleg Ponomarev <[email protected]> --- test/data/htools/hbal-location-2.data | 11 +++++++++++ test/hs/shelltests/htools-hbal.test | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/data/htools/hbal-location-2.data
diff --git a/test/data/htools/hbal-location-2.data b/test/data/htools/hbal-location-2.data new file mode 100644 index 0000000..1c5d83d --- /dev/null +++ b/test/data/htools/hbal-location-2.data @@ -0,0 +1,11 @@ +group-01|fake-uuid-01|preferred|| + +node-01|16384|0|16384|409600|357800|16|N|fake-uuid-01|1|power:a,power:c +node-02|16384|0|14336|409600|306600|16|N|fake-uuid-01|1|power:b +node-03|16384|0|16384|409600|409600|16|N|fake-uuid-01|1|power:a,power:c +node-04|16384|0|16384|409600|357800|16|Y|fake-uuid-01|1| + +inst1|1024|51200|1|running|Y|node-02|node-01|drbd|service-group:a,service-group:b|1 +inst4|1024|51200|1|running|Y|node-02|node-04|plain|service-group:a|1 + +htools:nlocation:power diff --git a/test/hs/shelltests/htools-hbal.test b/test/hs/shelltests/htools-hbal.test index 4ebe30c..53da8d5 100644 --- a/test/hs/shelltests/htools-hbal.test +++ b/test/hs/shelltests/htools-hbal.test @@ -29,3 +29,16 @@ ./test/hs/hbal -t $TESTDATA_DIR/hbal-location-1.data >>>/Solution length=[1-9]/ >>>= 0 + +./test/hs/hbal --print-nodes=name,pcnt -t $TESTDATA_DIR/hbal-location-2.data +>>>2/Final cluster status: + Name pcnt + node-01 0 + node-02 1 + node-03 1 + node-04 0/ +>>>= 0 + +./test/hs/hbal -t $TESTDATA_DIR/shared-n1-failure.data --ignore-dynu +>>>/Cluster is already well balanced/ +>>>= 0 -- 1.9.1
