[Debian-ha-commits] [resource-agents] 03/07: debian/tests: use ocft to test resource-agents

Valentin Vidic vvidic-guest at moszumanska.debian.org
Mon Jan 16 17:10:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository resource-agents.

commit 952d041787dcdc59f51ba0805ce81f1ba9543adc
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Thu Jan 12 16:58:02 2017 +0100

    debian/tests: use ocft to test resource-agents
---
 debian/patches/series |  1 +
 debian/tests/IPaddr2  | 19 +++++++++++++++++++
 debian/tests/control  | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 debian/tests/run-ocft | 16 ++++++++++++++++
 4 files changed, 83 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 9deaf2c..b8d9fd6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ mysql-path.patch
 no-dirty-version
 ipv6-linux-only
 850787-fix-typo
+ocft-configs.patch
diff --git a/debian/tests/IPaddr2 b/debian/tests/IPaddr2
new file mode 100755
index 0000000..a46b728
--- /dev/null
+++ b/debian/tests/IPaddr2
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+AGENT=IPaddr2
+
+cleanup () {
+  ocft clean $AGENT
+}
+
+trap "cleanup" 0 2 3 15
+
+IFACE=$(ip route show 0/0 | cut -d ' ' -f 5)
+sed "s/eth0/$IFACE/g" /usr/share/resource-agents/ocft/configs/$AGENT > $AUTOPKGTEST_TMP/$AGENT
+
+mkdir -p /run/resource-agents
+
+ocft make -d $AUTOPKGTEST_TMP $AGENT
+ocft test $AGENT
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..35cdb25
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,47 @@
+Tests: IPaddr2
+Depends: resource-agents
+Restrictions: needs-root, isolation-container
+
+Test-Command: debian/tests/run-ocft MailTo
+Depends: resource-agents, bsd-mailx
+Restrictions: needs-root, isolation-container
+
+Test-Command: debian/tests/run-ocft apache
+Depends: resource-agents, apache2, wget
+Restrictions: needs-root, isolation-container
+
+Test-Command: debian/tests/run-ocft mysql
+Depends: resource-agents, mysql-server
+Restrictions: needs-root, isolation-container
+
+Test-Command: debian/tests/run-ocft postfix
+Depends: resource-agents, postfix
+Restrictions: needs-root, isolation-container
+
+Test-Command: debian/tests/run-ocft named
+Depends: resource-agents, bind9, bind9-host, bind9utils
+Restrictions: needs-root, isolation-container
+
+Test-Command: debian/tests/run-ocft Filesystem
+Depends: resource-agents
+Restrictions: needs-root, isolation-machine
+
+Test-Command: debian/tests/run-ocft LVM
+Depends: resource-agents, lvm2
+Restrictions: needs-root, isolation-machine
+
+#Test-Command: debian/tests/run-ocft nfsserver
+#Depends: resource-agents, nfs-kernel-server
+#Restrictions: needs-root, isolation-machine
+
+Test-Command: debian/tests/run-ocft exportfs
+Depends: resource-agents, nfs-kernel-server
+Restrictions: needs-root, isolation-machine
+
+Test-Command: debian/tests/run-ocft exportfs-multidir
+Depends: resource-agents, nfs-kernel-server
+Restrictions: needs-root, isolation-machine
+
+Test-Command: debian/tests/run-ocft iscsi
+Depends: resource-agents, open-iscsi, targetcli-fb, openssl
+Restrictions: needs-root, isolation-machine
diff --git a/debian/tests/run-ocft b/debian/tests/run-ocft
new file mode 100755
index 0000000..a1f433a
--- /dev/null
+++ b/debian/tests/run-ocft
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+AGENT=$1
+
+cleanup () {
+  ocft clean $AGENT
+}
+
+trap "cleanup" 0 2 3 15
+
+mkdir -p /run/resource-agents
+
+ocft make $AGENT
+ocft test $AGENT

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/resource-agents.git



More information about the Debian-HA-Commits mailing list