Revision 189b51fa htest/shelltests/htools-hail.test
b/htest/shelltests/htools-hail.test | ||
---|---|---|
1 | 1 |
# test that on invalid files it can't parse the request |
2 |
./test/hail /dev/null |
|
2 |
./htest/hail /dev/null
|
|
3 | 3 |
>>>2 /Invalid JSON/ |
4 | 4 |
>>>= !0 |
5 | 5 |
|
6 | 6 |
# another invalid example |
7 |
echo '[]' | ./test/hail - |
|
7 |
echo '[]' | ./htest/hail -
|
|
8 | 8 |
>>>2 /Unable to read JSObject/ |
9 | 9 |
>>>= !0 |
10 | 10 |
|
11 | 11 |
# empty dict |
12 |
echo '{}' | ./test/hail - |
|
12 |
echo '{}' | ./htest/hail -
|
|
13 | 13 |
>>>2 /key 'request' not found/ |
14 | 14 |
>>>= !0 |
15 | 15 |
|
16 |
echo '{"request": 0}' | ./test/hail - |
|
16 |
echo '{"request": 0}' | ./htest/hail -
|
|
17 | 17 |
>>>2 /key 'request'/ |
18 | 18 |
>>>= !0 |
19 | 19 |
|
20 |
./test/hail $TESTDATA_DIR/hail-invalid-reloc.json |
|
20 |
./htest/hail $TESTDATA_DIR/hail-invalid-reloc.json
|
|
21 | 21 |
>>>2 /key 'name': Unable to read String/ |
22 | 22 |
>>>= !0 |
23 | 23 |
|
24 | 24 |
# and now start the real tests |
25 |
./test/hail $TESTDATA_DIR/hail-alloc-drbd.json |
|
25 |
./htest/hail $TESTDATA_DIR/hail-alloc-drbd.json
|
|
26 | 26 |
>>> /"success":true,.*,"result":\["node2","node1"\]/ |
27 | 27 |
>>>= 0 |
28 | 28 |
|
29 |
./test/hail $TESTDATA_DIR/hail-reloc-drbd.json |
|
29 |
./htest/hail $TESTDATA_DIR/hail-reloc-drbd.json
|
|
30 | 30 |
>>> /"success":true,.*,"result":\["node1"\]/ |
31 | 31 |
>>>= 0 |
32 | 32 |
|
33 |
./test/hail $TESTDATA_DIR/hail-node-evac.json |
|
33 |
./htest/hail $TESTDATA_DIR/hail-node-evac.json
|
|
34 | 34 |
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/ |
35 | 35 |
>>>= 0 |
36 | 36 |
|
37 |
./test/hail $TESTDATA_DIR/hail-change-group.json |
|
37 |
./htest/hail $TESTDATA_DIR/hail-change-group.json
|
|
38 | 38 |
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/ |
39 | 39 |
>>>= 0 |
40 | 40 |
|
41 | 41 |
# check that hail can use the simu backend |
42 |
./test/hail --simu p,8,8T,16g,16 $TESTDATA_DIR/hail-alloc-drbd.json |
|
42 |
./htest/hail --simu p,8,8T,16g,16 $TESTDATA_DIR/hail-alloc-drbd.json
|
|
43 | 43 |
>>> /"success":true,/ |
44 | 44 |
>>>= 0 |
45 | 45 |
|
46 | 46 |
# check that hail can use the text backend |
47 |
./test/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json |
|
47 |
./htest/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json
|
|
48 | 48 |
>>> /"success":true,/ |
49 | 49 |
>>>= 0 |
50 | 50 |
|
51 | 51 |
# check that hail can use the simu backend |
52 |
./test/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json |
|
52 |
./htest/hail -t $T/simu-rebal-merged.standard $TESTDATA_DIR/hail-alloc-drbd.json
|
|
53 | 53 |
>>> /"success":true,/ |
54 | 54 |
>>>= 0 |
55 | 55 |
|
56 | 56 |
# check that hail pre/post saved state differs after allocation |
57 |
./test/hail -v -v -v -p $TESTDATA_DIR/hail-alloc-drbd.json -S $T/hail-alloc >/dev/null 2>&1 && ! diff -q $T/hail-alloc.pre-ialloc $T/hail-alloc.post-ialloc |
|
57 |
./htest/hail -v -v -v -p $TESTDATA_DIR/hail-alloc-drbd.json -S $T/hail-alloc >/dev/null 2>&1 && ! diff -q $T/hail-alloc.pre-ialloc $T/hail-alloc.post-ialloc
|
|
58 | 58 |
>>> /Files .* and .* differ/ |
59 | 59 |
>>>= 0 |
60 | 60 |
|
61 | 61 |
# check that hail pre/post saved state differs after relocation |
62 |
./test/hail -v -v -v -p $TESTDATA_DIR/hail-reloc-drbd.json -S $T/hail-reloc >/dev/null 2>&1 && ! diff -q $T/hail-reloc.pre-ialloc $T/hail-reloc.post-ialloc |
|
62 |
./htest/hail -v -v -v -p $TESTDATA_DIR/hail-reloc-drbd.json -S $T/hail-reloc >/dev/null 2>&1 && ! diff -q $T/hail-reloc.pre-ialloc $T/hail-reloc.post-ialloc
|
|
63 | 63 |
>>> /Files .* and .* differ/ |
64 | 64 |
>>>= 0 |
65 | 65 |
|
66 | 66 |
# evac tests |
67 |
./test/hail $T/hail-node-evac.json.primary-only |
|
67 |
./htest/hail $T/hail-node-evac.json.primary-only
|
|
68 | 68 |
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/ |
69 | 69 |
>>>= 0 |
70 | 70 |
|
71 |
./test/hail $T/hail-node-evac.json.secondary-only |
|
71 |
./htest/hail $T/hail-node-evac.json.secondary-only
|
|
72 | 72 |
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/ |
73 | 73 |
>>>= 0 |
74 | 74 |
|
75 |
./test/hail $T/hail-node-evac.json.all |
|
75 |
./htest/hail $T/hail-node-evac.json.all
|
|
76 | 76 |
>>> /"success":true,"info":"Request successful: 0 instances failed to move and 1 were moved successfully"/ |
77 | 77 |
>>>= 0 |
Also available in: Unified diff