--- /dev/null
+#!/bin/bash
+#
+# Tests that we can start, stop, and restart.
+
+set -e
+. "${0%/*}"/acommon
+
+test-prep
+
+perl <test/test.cfg >/etc/hippotat/main.cfg -pe '
+ s{^addrs *=.*}{addrs = 127.0.0.1};
+'
+
+cat >>/etc/default/hippotatd <<END
+CHECK_FIREWALL=false
+USER=root
+END
+
+service hippotatd start
+curl http://localhost:8099/ | tee /dev/stderr | grep hippotat
+
+dpid=$(pidof hippotatd)
+
+service hippotatd restart
+
+dpid2=$(pidof hippotatd)
+
+test $dpid != $dpid2
+
+service hippotatd stop
+
+( LC_MESSAGES=C nc -v localhost 8099 2>&1 ||: ) \
+ | tee /dev/stderr | grep 'Connection refused'
+
+echo ok.
}
check_firewall () {
+ $CHECK_FIREWALL || return 0
vnetwork=$(print_config vnetwork)
if dump_firewall | fgrep " $vnetwork " >/dev/null; then :; else
log_failure_msg \
rsyslog, authbind, iptables,
bash, iproute2, util-linux, iputils-ping
Restrictions: needs-root, allow-stderr
+
+Tests: adt-initscript
+Tests-Directory: adt
+Depends:
+ hippotat-server,
+ net-tools,
+ rsyslog,
+ bash, userv-utils, netcat-openbsd, curl
+Restrictions: needs-root, allow-stderr