6
juju destroy-service mongodb
13
for try in `seq 1 600` ; do
14
host=`juju status | tests/get-unit-info mongodb public-address`
16
if [ -z "$host" ] ; then
23
if [ -z "$host" ] ; then
24
echo FAIL: host timed out
29
for try in `seq 1 600` ; do
30
status=`juju status | tests/get-unit-info mongodb agent-state`
31
if [ "$status" != "started" ] ; then
34
echo "found status as $status"
39
if [ -z "$status" ] ; then
40
echo FAIL: status timed out
45
assert_is_listening() {
49
for try in `seq 1 $tries` ; do
50
if ! nc $host $port < /dev/null ; then
57
if [ -z "$listening" ] ; then
58
echo "FAIL: not listening on port $port after $tries retries"
61
echo "PASS: listening on port $port"
68
assert_is_listening 27017 10
70
juju set mongodb port=55555
71
assert_is_listening 55555 200000
72
echo PASS: config changes tests passed.