3 source `dirname $0`/functions
7 SGCONFPATH="$BASEPATH/stg/projects/sgconf"
9 printf "Check initial service list... "
11 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
16 printf "Failed to get services list. Result:\n$RES\n"
20 NAMES=`getFields "name" "$RES"`
27 printf "Services list should be empty.\n"
28 printf "Names:\n$NAMES\n"
29 printf -- "--------\n$NUM\n\n"
33 printf "Ok.\nCheck adding services... "
35 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --add-service test`
40 printf "Failed to add new service. Result:\n$RES\n"
44 printf "Ok.\nCheck new service list... "
46 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
51 printf "Failed to get services list. Result:\n$RES\n"
55 NAMES=`getFields "name" "$RES"`
62 printf "Services list should have exactly one entry.\n"
63 printf "Names:\n$NAMES\n"
64 printf -- "--------\n$NUM\n\n"
68 printf "Ok.\nCheck deletion exisiting service... "
70 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --del-service test`
75 printf "Failed to delete a service. Result:\n$RES\n"
79 printf "Ok.\nCheck new service list... "
81 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
86 printf "Failed to get services list. Result:\n$RES\n"
90 NAMES=`getFields "name" "$RES"`
97 printf "Services list should be empty.\n"
98 printf "Names:\n$NAMES\n"
99 printf -- "--------\n$NUM\n\n"