mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
7f3a0c7e9c
commit
0b728a4e8f
@ -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 <<EOF
|
||||
&Starting nfs-kernel-server: OK
|
||||
EOF
|
||||
;;
|
||||
systemd-*)
|
||||
echo "&Starting rpc-statd: OK"
|
||||
;;
|
||||
esac
|
||||
@ -143,6 +149,11 @@ guess_output ()
|
||||
cat <<EOF
|
||||
&Starting nfslock: OK
|
||||
&Starting nfs: OK
|
||||
EOF
|
||||
;;
|
||||
sysvinit-debian)
|
||||
cat <<EOF
|
||||
&Starting nfs-kernel-server: OK
|
||||
EOF
|
||||
;;
|
||||
systemd-redhat)
|
||||
@ -150,6 +161,13 @@ EOF
|
||||
&Starting rpc-statd: OK
|
||||
&Starting nfs-server: OK
|
||||
&Starting rpc-rquotad: OK
|
||||
EOF
|
||||
;;
|
||||
systemd-debian)
|
||||
cat <<EOF
|
||||
&Starting rpc-statd: OK
|
||||
&Starting nfs-server: OK
|
||||
&Starting quotarpc: OK
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
@ -166,6 +184,13 @@ EOF
|
||||
systemd-redhat)
|
||||
echo "Stopping rpc-rquotad: OK"
|
||||
;;
|
||||
systemd-debian)
|
||||
if service "quotarpc" status >/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)
|
||||
|
Loading…
Reference in New Issue
Block a user