Revision 9915fb20

b/Makefile.am
715 715
	test/data/htools/hail-change-group.json \
716 716
	test/data/htools/hail-node-evac.json \
717 717
	test/data/htools/hail-reloc-drbd.json \
718
	test/data/htools/common-suffix.data \
719
	test/data/htools/invalid-node.data \
720
	test/data/htools/missing-resources.data \
718 721
	test/data/htools/rapi/groups.json \
719 722
	test/data/htools/rapi/info.json \
720 723
	test/data/htools/rapi/instances.json \
b/htools/offline-test.sh
60 60
  grep -q "Error: Only one of the rapi, luxi, and data files options should be given."
61 61
echo OK
62 62

  
63
echo Checking text file loading
64
hbal -t $TESTDATA_DIR/missing-resources.data 2>&1 | \
65
  grep "node node2 is missing .* ram and .* disk" >/dev/null
66
hbal -t $TESTDATA_DIR/common-suffix.data -v 2>&1 | \
67
  grep "Stripping common suffix of '.example.com' from names" >/dev/null
68
(! hbal -t $TESTDATA_DIR/invalid-node.data 2>&1 ) | \
69
  grep "Unknown node '.*' for instance new-0" >/dev/null
70
echo OK
71

  
63 72
echo Checking hspace machine-readable mode
64 73
hspace --simu p,4,8T,64g,16 --machine-readable \
65 74
  --disk-template drbd -l 8 >$T/capacity
b/test/data/htools/common-suffix.data
1
default|fake-uuid-01|preferred
2

  
3
node1.example.com|1024|0|1024|95367|95367|4|N|fake-uuid-01|1
4
node2.example.com|1024|0|896|95367|94343|4|N|fake-uuid-01|1
5

  
6
instance1.example.com|128|1024|1|running|Y|node2.example.com||plain|
7

  
8

  
9
|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
10
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
b/test/data/htools/invalid-node.data
1
group-01|fake-uuid-01|preferred
2

  
3
node-01-001|1024|0|1024|95367|95367|4|N|fake-uuid-01|1
4
node-01-002|1024|0|896|95367|94343|4|N|fake-uuid-01|1
5

  
6
new-0|128|1024|1|running|Y|no-such-node||plain|
7

  
8

  
9
|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
10
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
b/test/data/htools/missing-resources.data
1
default|fake-uuid-01|preferred
2

  
3
node1|1024|0|1024|95367|95367|4|N|fake-uuid-01|1
4
node2|1024|0|0|95367|0|4|N|fake-uuid-01|1
5

  
6

  
7

  
8
|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
9
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

Also available in: Unified diff