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

Valentin Vidic vvidic-guest at moszumanska.debian.org
Mon Jan 16 17:10:06 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 3520968f72c2af857d318d97c1f11a41f70f2e31
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Mon Jan 16 18:09:05 2017 +0100

    debian/tests: use ocft to test nfsserver agent
---
 debian/tests/control   |  8 ++++----
 debian/tests/nfsserver | 19 +++++++++++++++++++
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/debian/tests/control b/debian/tests/control
index ee8a6d5..9fdb9c4 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -34,10 +34,6 @@ 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
@@ -46,6 +42,10 @@ Test-Command: debian/tests/run-ocft exportfs-multidir
 Depends: resource-agents, nfs-kernel-server
 Restrictions: needs-root, isolation-machine
 
+Tests: nfsserver
+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/nfsserver b/debian/tests/nfsserver
new file mode 100755
index 0000000..1ada66a
--- /dev/null
+++ b/debian/tests/nfsserver
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+AGENT=nfsserver
+
+cleanup () {
+  ocft clean $AGENT
+}
+
+trap "cleanup" 0 2 3 15
+
+service nfs-common start 2>/dev/null || true
+service rpc-statd start  2>/dev/null || true
+
+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