[Debian-ha-commits] [csync2] 01/05: Add debian/tests
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Fri Oct 7 19:17:58 UTC 2016
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch master
in repository csync2.
commit fb39ae8f2970bb94c1472eeec24fa9261309a369
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date: Fri Oct 7 19:53:24 2016 +0200
Add debian/tests
---
debian/tests/control | 3 +++
debian/tests/self-update | 28 ++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..7f46295
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Depends: @, openssl
+Tests: self-update
+Restrictions: needs-root
diff --git a/debian/tests/self-update b/debian/tests/self-update
new file mode 100755
index 0000000..b19bc4a
--- /dev/null
+++ b/debian/tests/self-update
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+HOSTNAME=$(hostname)
+
+# prepare configuration
+cat >/etc/csync2.cfg <<EOF
+group test
+{
+ host 127.0.0.1;
+ host 127.0.0.2;
+ host $HOSTNAME;
+ key /etc/csync2.key;
+ include /etc/shells;
+}
+EOF
+
+# prepare keys
+csync2 -k /etc/csync2.key
+
+openssl req -x509 -newkey rsa:2048 \
+ -days 300 -subj '/CN=csync2' -nodes \
+ -keyout /etc/csync2_ssl_key.pem \
+ -out /etc/csync2_ssl_cert.pem 2>&1
+
+# sync with inetd daemon on this host
+csync2 -x -N 127.0.0.2 -P 127.0.0.1 -v 2>&1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/csync2.git
More information about the Debian-HA-Commits
mailing list