1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

ctdb-tests: Create 49.winbind.sh

Contains testing support used only by tests for 49.winbind event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-03-19 20:47:48 +11:00 committed by Amitay Isaacs
parent f33f4b3a23
commit a51e4ea042
2 changed files with 32 additions and 33 deletions

View File

@ -0,0 +1,32 @@
setup_winbind ()
{
setup_ctdb
service_name="winbind"
if [ "$1" != "down" ] ; then
debug "Marking Winbind service as up and managed by CTDB"
service "winbind" force-started
export CTDB_MANAGES_WINBIND="yes"
export FAKE_WBINFO_FAIL="no"
else
debug "Marking Winbind service as down and not managed by CTDB"
service "winbind" force-stopped
export CTDB_MANAGES_WINBIND=""
export FAKE_WBINFO_FAIL="yes"
fi
}
wbinfo_down ()
{
debug "Making wbinfo commands fail"
FAKE_WBINFO_FAIL="yes"
}

View File

@ -605,39 +605,6 @@ samba_setup_fake_threads ()
SAMBA_STACK_TRACES="$_out" SAMBA_STACK_TRACES="$_out"
} }
setup_winbind ()
{
setup_ctdb
service_name="winbind"
if [ "$1" != "down" ] ; then
debug "Marking Winbind service as up and managed by CTDB"
service "winbind" force-started
export CTDB_MANAGES_WINBIND="yes"
export FAKE_WBINFO_FAIL="no"
else
debug "Marking Winbind service as down and not managed by CTDB"
service "winbind" force-stopped
export CTDB_MANAGES_WINBIND=""
export FAKE_WBINFO_FAIL="yes"
fi
}
wbinfo_down ()
{
debug "Making wbinfo commands fail"
FAKE_WBINFO_FAIL="yes"
}
###################################################################### ######################################################################
# NFS fakery # NFS fakery