mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-tests: 31.clamd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
0bc1b4b27e
commit
3172dc7244
@ -4,10 +4,10 @@
|
||||
|
||||
define_test "Not managed, clamd not listening"
|
||||
|
||||
export CTDB_MANAGES_CLAMD=no
|
||||
export CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
setup
|
||||
|
||||
setup_generic
|
||||
CTDB_MANAGES_CLAMD=no
|
||||
CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
|
||||
ok_null
|
||||
simple_test
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
define_test "Managed, clamd not listening"
|
||||
|
||||
export CTDB_MANAGES_CLAMD=yes
|
||||
export CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
setup
|
||||
|
||||
setup_generic
|
||||
CTDB_MANAGES_CLAMD=yes
|
||||
CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
|
||||
required_result 1 <<EOF
|
||||
ERROR: clamd not listening on $CTDB_CLAMD_SOCKET
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
define_test "Managed, clamd listening"
|
||||
|
||||
export CTDB_MANAGES_CLAMD=yes
|
||||
export CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
setup
|
||||
|
||||
setup_generic
|
||||
CTDB_MANAGES_CLAMD=yes
|
||||
CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
|
||||
unix_socket_listening "$CTDB_CLAMD_SOCKET"
|
||||
|
||||
|
7
ctdb/tests/eventscripts/scripts/31.clamd.sh
Normal file
7
ctdb/tests/eventscripts/scripts/31.clamd.sh
Normal file
@ -0,0 +1,7 @@
|
||||
setup ()
|
||||
{
|
||||
export CTDB_MANAGES_CLAMD="yes"
|
||||
export CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
|
||||
|
||||
setup_unix_listen
|
||||
}
|
@ -91,7 +91,7 @@ setup_generic ()
|
||||
setup_dbdir
|
||||
setup_date
|
||||
|
||||
export FAKE_TCP_LISTEN FAKE_NETSTAT_UNIX_LISTEN
|
||||
export FAKE_TCP_LISTEN
|
||||
}
|
||||
|
||||
tcp_port_down ()
|
||||
@ -102,6 +102,11 @@ tcp_port_down ()
|
||||
done
|
||||
}
|
||||
|
||||
setup_unix_listen ()
|
||||
{
|
||||
export FAKE_NETSTAT_UNIX_LISTEN="$*"
|
||||
}
|
||||
|
||||
unix_socket_listening ()
|
||||
{
|
||||
_s="$1"
|
||||
|
Loading…
Reference in New Issue
Block a user