From: Martin Schwenke Date: Fri, 18 Mar 2022 01:55:07 +0000 (+1100) Subject: ctdb-tests: Improve Debian-style event script unit testing X-Git-Tag: tevent-0.13.0~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b728a4e8f6f81b5c2b44fa65d2b68167eb8e7ce;p=thirdparty%2Fsamba.git ctdb-tests: Improve Debian-style event script unit testing Tests can be run by hand using different distro styles, such as: CTDB_NFS_DISTRO_STYLE=systemd-debian \ ./tests/run_tests.sh ./tests/UNIT/eventscripts/{06,60}.nfs.* This fixes known problems for Debian styles, so the tests now pass for the following values of CTDB_NFS_DISTRO_STYLE: systemd-redhat sysvinit-redhat systemd-debian sysvinit-debian Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/UNIT/eventscripts/scripts/60.nfs.sh b/ctdb/tests/UNIT/eventscripts/scripts/60.nfs.sh index 2a269910826..f898de45e25 100644 --- a/ctdb/tests/UNIT/eventscripts/scripts/60.nfs.sh +++ b/ctdb/tests/UNIT/eventscripts/scripts/60.nfs.sh @@ -53,6 +53,7 @@ EOF sysvinit-*) service "nfs" force-stopped service "nfslock" force-stopped + service "nfs-kernel-server" force-stopped ;; systemd-*) service "nfs-server" force-stopped @@ -132,7 +133,12 @@ guess_output () sysvinit-redhat) echo "&Starting nfslock: OK" ;; - systemd-redhat) + sysvinit-debian) + cat </dev/null; then + echo "Stopping quotarpc: OK" + else + echo "service: can't stop quotarpc - not running" + fi + ;; esac ;; $CTDB_NFS_CALLOUT\ stop\ status) @@ -187,6 +212,9 @@ EOF systemd-redhat) echo "&Starting rpc-rquotad: OK" ;; + systemd-debian) + echo "&Starting quotarpc: OK" + ;; esac ;; $CTDB_NFS_CALLOUT\ start\ status)