5 SGCONFPATH="$BASEPATH/stg/projects/sgconf"
7 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
11 printf "Failed to get services list. Result:\n$RES\n"
15 printf "Got services list:\n"
23 NAME=`printf "$LINE" | grep name`
26 NAMES="$NAMES\n"`printf "$NAME" | cut -d: -f2 | sed -e 's/^ *//' -e 's/ *$//'`
31 printf "Names:\n$NAMES\n"
33 NUM=`printf "$NAMES" | wc -l`
35 printf -- "--------\n$NUM\n\n"
39 printf "Services list should be empty.\n"
43 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --add-service test`
47 printf "Failed to add new service. Result:\n$RES\n"
51 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
55 printf "Failed to get services list. Result:\n$RES\n"
59 printf "Got services list:\n"
67 NAME=`printf "$LINE" | grep name`
70 NAMES="$NAMES\n"`printf "$NAME" | cut -d: -f2 | sed -e 's/^ *//' -e 's/ *$//'`
75 printf "Names:\n$NAMES\n"
77 NUM=`printf "$NAMES" | wc -l`
79 printf -- "--------\n$NUM\n\n"
83 printf "Services list should have exactly one entry.\n"
87 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --del-service test`
91 printf "Failed to delete a service. Result:\n$RES\n"
95 RES=`"$SGCONFPATH/sgconf" -s localhost -p 5555 -u admin -w 123456 --get-services`
99 printf "Failed to get services list. Result:\n$RES\n"
103 printf "Got services list:\n"
111 NAME=`printf "$LINE" | grep name`
114 NAMES="$NAMES\n"`printf "$NAME" | cut -d: -f2 | sed -e 's/^ *//' -e 's/ *$//'`
119 printf "Names:\n$NAMES\n"
121 NUM=`printf "$NAMES" | wc -l`
123 printf -- "--------\n$NUM\n\n"
127 printf "Services list should be empty.\n"