]> git.stg.codes - stg.git/blob - functest/test_server_info.sh
Install some necessary libs in Travis.
[stg.git] / functest / test_server_info.sh
1 #!/bin/sh
2
3 source `dirname $0`/functions
4
5 BASEPATH=$1
6
7 SGCONFPATH="$BASEPATH/stg/projects/sgconf"
8
9 printf "Check server info... "
10
11 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --server-info`
12
13 if [ "$?" != "0" ]
14 then
15     printf "Error.\n"
16     printf "Failed to get admins list. Result:\n$RES\n"
17     exit 0
18 fi
19
20 printf "Ok\nResult:\n%s" "$RES"
21
22 #LOGINS=`getFields "login" "$RES"`
23 #
24 #NUM=`count "$LOGINS"`
25 #
26 #if [ "$NUM" != "1" ]
27 #then
28 #    printf "Failed.\n"
29 #    printf "Admin list should have exactly one entry.\n"
30 #    printf "Logins:\n$LOGINS\n"
31 #    printf -- "--------\n$NUM\n\n"
32 #    exit 0
33 #fi