Commit 9915fb20 authored by Iustin Pop's avatar Iustin Pop

Add tests for custom text files

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 8d616d4d
......@@ -715,6 +715,9 @@ TEST_FILES = \
test/data/htools/hail-change-group.json \
test/data/htools/hail-node-evac.json \
test/data/htools/hail-reloc-drbd.json \
test/data/htools/common-suffix.data \
test/data/htools/invalid-node.data \
test/data/htools/missing-resources.data \
test/data/htools/rapi/groups.json \
test/data/htools/rapi/info.json \
test/data/htools/rapi/instances.json \
......
......@@ -60,6 +60,15 @@ echo Checking failure on multiple backends
grep -q "Error: Only one of the rapi, luxi, and data files options should be given."
echo OK
echo Checking text file loading
hbal -t $TESTDATA_DIR/missing-resources.data 2>&1 | \
grep "node node2 is missing .* ram and .* disk" >/dev/null
hbal -t $TESTDATA_DIR/common-suffix.data -v 2>&1 | \
grep "Stripping common suffix of '.example.com' from names" >/dev/null
(! hbal -t $TESTDATA_DIR/invalid-node.data 2>&1 ) | \
grep "Unknown node '.*' for instance new-0" >/dev/null
echo OK
echo Checking hspace machine-readable mode
hspace --simu p,4,8T,64g,16 --machine-readable \
--disk-template drbd -l 8 >$T/capacity
......
default|fake-uuid-01|preferred
node1.example.com|1024|0|1024|95367|95367|4|N|fake-uuid-01|1
node2.example.com|1024|0|896|95367|94343|4|N|fake-uuid-01|1
instance1.example.com|128|1024|1|running|Y|node2.example.com||plain|
|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,1|diskless,file,sharedfile,plain,blockdev,drbd,rbd|4.0|32.0
default|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,1|diskless,file,sharedfile,plain,blockdev,drbd,rbd|4.0|32.0
group-01|fake-uuid-01|preferred
node-01-001|1024|0|1024|95367|95367|4|N|fake-uuid-01|1
node-01-002|1024|0|896|95367|94343|4|N|fake-uuid-01|1
new-0|128|1024|1|running|Y|no-such-node||plain|
|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,8|diskless,file,sharedfile,plain,blockdev,drbd,rbd|4.0|32.0
group-01|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,8|diskless,file,sharedfile,plain,blockdev,drbd,rbd|4.0|32.0
default|fake-uuid-01|preferred
node1|1024|0|1024|95367|95367|4|N|fake-uuid-01|1
node2|1024|0|0|95367|0|4|N|fake-uuid-01|1
|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,8|diskless,file,sharedfile,plain,blockdev,drbd,rbd|4.0|32.0
default|128,1,1024,1,1,1|128,1,1024,1,1,1|32768,8,1048576,16,8,8|diskless,file,sharedfile,plain,blockdev,drbd,rbd|4.0|32.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