Revision 8d616d4d
b/htools/offline-test.sh | ||
---|---|---|
130 | 130 |
done |
131 | 131 |
echo OK |
132 | 132 |
|
133 |
echo Checking utilisation-based code |
|
134 |
BACKEND="-t $T/simu-onegroup.standard" |
|
135 |
echo a > $T/dynu |
|
136 |
(! hbal -U <(echo a) $BACKEND 2>&1 ) | grep -q "Cannot parse line" |
|
137 |
(! hbal -U <(echo a b c d e f g h) $BACKEND 2>&1 ) | \ |
|
138 |
grep -q "Cannot parse line" |
|
139 |
(! hbal -U <(echo inst cpu mem dsk net) $BACKEND 2>&1 ) | \ |
|
140 |
grep -Eq "cannot parse string '(cpu|mem|dsk|net)'" |
|
141 |
# unknown instances are currently just ignored |
|
142 |
hbal -U <(echo no-such-inst 2 2 2 2) $BACKEND >/dev/null 2>&1 |
|
143 |
# new-0 is the name of the first instance allocated by hspace |
|
144 |
hbal -U <(echo new-0 2 2 2 2) $BACKEND >/dev/null 2>&1 |
|
145 |
echo OK |
|
146 |
|
|
147 |
echo Checking selected/excluded instances |
|
148 |
(! hbal $BACKEND --exclude-instances no-such-instance 2>&1 ) | \ |
|
149 |
grep -q "Unknown instance" |
|
150 |
(! hbal $BACKEND --select-instances no-such-instances 2>&1 ) | \ |
|
151 |
grep -q "Unknown instance" |
|
152 |
hbal $BACKEND --exclude-instances new-0 --select-instances new-1 >/dev/null |
|
153 |
echo OK |
|
154 |
|
|
133 | 155 |
echo IAllocator checks |
134 | 156 |
# test that on invalid files it can't parse the request |
135 | 157 |
(! hail /dev/null 2>&1 ) | grep -q "Invalid JSON" |
Also available in: Unified diff