[SCM] icecast2/master: Add simple autopkgtest check for the daemon.

pere at users.alioth.debian.org pere at users.alioth.debian.org
Fri Jul 21 09:36:34 UTC 2017


The following commit has been merged in the master branch:
commit aa5ab62f77201a5a7932d4f9c3128f5ff54a5f80
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Fri Jul 21 09:23:35 2017 +0000

    Add simple autopkgtest check for the daemon.

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..962ae69
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test-daemon
+Depends: @, curl
diff --git a/debian/tests/test-daemon b/debian/tests/test-daemon
new file mode 100755
index 0000000..2198e9b
--- /dev/null
+++ b/debian/tests/test-daemon
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+server=localhost
+
+set -e
+
+PATH=/usr/sbin:$PATH
+export PATH
+
+at_exit() {
+    echo "info: test exiting"
+}
+
+trap at_exit INT TERM EXIT
+
+echo "info: reporting daemon status"
+if service icecast2 status ; then
+    echo "success: service reported success"
+fi
+
+if curl -s http://$server:8000/ | grep -q icecast.org ; then
+    echo "success: HTTP request to Icecast server worked."
+else
+    echo "failure: HTTP request to Icecast server did not contain the words icecast.org."
+fi

-- 
icecast2 packaging



More information about the pkg-multimedia-commits mailing list