root / test / htools-balancing.test @ 53d4cdf1
History | View | Annotate | Download (1.9 kB)
1 |
### std tests |
---|---|
2 |
|
3 |
# test basic parsing |
4 |
./test/hinfo -v -v -p --print-instances $BACKEND_BAL_STD |
5 |
>>>= 0 |
6 |
./test/hbal -v -v -v -p --print-instances $BACKEND_BAL_STD -G group-01 |
7 |
>>> !/(Nothing to do, exiting|No solution found)/ |
8 |
>>>2 !/(Nothing to do, exiting|No solution found)/ |
9 |
>>>= 0 |
10 |
|
11 |
# test command output |
12 |
./test/hbal $BACKEND_BAL_STD -G group-01 -C -S $T/simu-rebal.standard |
13 |
>>> /gnt-instance (failover|migrate|replace-disks)/ |
14 |
>>>= 0 |
15 |
|
16 |
# test saving commands |
17 |
./test/hbal $BACKEND_BAL_STD -G group-01 -C$T/rebal-cmds.standard |
18 |
>>>= 0 |
19 |
# and now check the file (depends on previous test) |
20 |
cat $T/rebal-cmds.standard |
21 |
>>> /gnt-instance (failover|migrate|replace-disks)/ |
22 |
>>>= 0 |
23 |
|
24 |
# state saved before rebalancing should be identical; depends on the |
25 |
# previous test |
26 |
diff -u $T/simu-rebal-merged.standard $T/simu-rebal.standard.original |
27 |
>>> |
28 |
>>>= 0 |
29 |
|
30 |
# no double rebalance; depends on previous test |
31 |
./test/hbal -t $T/simu-rebal.standard.balanced -G group-01 |
32 |
>>> /(Nothing to do, exiting|No solution found)/ |
33 |
>>>= 0 |
34 |
|
35 |
### now tiered tests |
36 |
|
37 |
# test basic parsing |
38 |
./test/hinfo -v -v -p --print-instances $BACKEND_BAL_TIER |
39 |
>>>= 0 |
40 |
./test/hbal -v -v -v -p --print-instances $BACKEND_BAL_TIER -G group-01 |
41 |
>>> !/(Nothing to do, exiting|No solution found)/ |
42 |
>>>2 !/(Nothing to do, exiting|No solution found)/ |
43 |
>>>= 0 |
44 |
|
45 |
# test command output |
46 |
./test/hbal $BACKEND_BAL_TIER -G group-01 -C -S $T/simu-rebal.tiered |
47 |
>>> /gnt-instance (failover|migrate|replace-disks)/ |
48 |
>>>= 0 |
49 |
|
50 |
# test saving commands |
51 |
./test/hbal $BACKEND_BAL_TIER -G group-01 -C$T/rebal-cmds.tiered |
52 |
>>>= 0 |
53 |
# and now check the file (depends on previous test) |
54 |
cat $T/rebal-cmds.tiered |
55 |
>>> /gnt-instance (failover|migrate|replace-disks)/ |
56 |
>>>= 0 |
57 |
|
58 |
# state saved before rebalancing should be identical; depends on the |
59 |
# previous test |
60 |
diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original |
61 |
>>> |
62 |
>>>= 0 |
63 |
|
64 |
# no double rebalance; depends on previous test |
65 |
./test/hbal -t $T/simu-rebal.tiered.balanced -G group-01 |
66 |
>>> /(Nothing to do, exiting|No solution found)/ |
67 |
>>>= 0 |