forked from accelazh/ceph-allinone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-all.sh
executable file
·43 lines (35 loc) · 1.11 KB
/
test-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
########################################
# This file tests whether all services
# are properly installed and running
########################################
BASEDIR=$(dirname $0)
. ${BASEDIR}/config.sh
${BASEDIR}/test-mon.sh
if [ $? != 0 ]; then
echo "Monitor tests failed. Exiting configuration process."
exit 1
fi
${BASEDIR}/test-osd.sh
if [ $? != 0 ]; then
echo "OSD tests failed. Exiting configuration process."
exit 1
fi
# to test whether working after restart
# TODO-01 re-start may causes errors sometime (i.e. won't pass my tests). It may because 'stop' uses kill to terminate processes. Avoiding re-start (i.e don't stop) will walkaround this problem. But I think re-start is still a needed feature.
if [ "$test_restart" == "true" ]; then
echo "Performing restart tests ..."
${BASEDIR}/stop-all.sh
${BASEDIR}/start-all.sh
${BASEDIR}/test-osd.sh
if [ $? != 0 ]; then
echo "OSD tests failed. Exiting configuration process."
exit 1
fi
${BASEDIR}/test-mon.sh
if [ $? != 0 ]; then
echo "Monitor tests failed. Exiting configuration process."
exit 1
fi
fi
echo "All tests have succeeded."