3 source `dirname $0`/functions
7 SGCONFPATH="$BASEPATH/stg/projects/sgconf"
9 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
13 printf "Failed to get services list. Result:\n$RES\n"
17 NAMES=`getFields "name" "$RES"`
19 printf "Names:\n$NAMES\n"
23 printf -- "--------\n$NUM\n\n"
27 printf "Services list should be empty.\n"
31 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --add-service test`
35 printf "Failed to add new service. Result:\n$RES\n"
39 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
43 printf "Failed to get services list. Result:\n$RES\n"
47 NAMES=`getFields "name" "$RES"`
49 printf "Names:\n$NAMES\n"
53 printf -- "--------\n$NUM\n\n"
57 printf "Services list should have exactly one entry.\n"
61 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --del-service test`
65 printf "Failed to delete a service. Result:\n$RES\n"
69 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
73 printf "Failed to get services list. Result:\n$RES\n"
77 NAMES=`getFields "name" "$RES"`
79 printf "Names:\n$NAMES\n"
83 printf -- "--------\n$NUM\n\n"
87 printf "Services list should be empty.\n"