diff --git a/tools/ocft/mysql-proxy b/tools/ocft/mysql-proxy index 1c45f9379..23683c76c 100644 --- a/tools/ocft/mysql-proxy +++ b/tools/ocft/mysql-proxy @@ -1,81 +1,81 @@ # mysql-proxy # by r.bhatia@ipax.at # # test cases (to implement): # # */usr/sbin/ocf-tester -n mp /usr/lib/ocf/resource.d/heartbeat/mysql-proxy # */usr/sbin/ocf-tester -n ms -o binary="/usr/sbin/mysql-proxy" -o defaults_file="" -o parameters="--proxy-skip-profiling" \ # -o admin_address="127.0.0.1:4041" -o proxy_backend_addresses="192.168.100.200:42006" \ # -o proxy_address="/var/run/mysqld/mysqld.sock" /usr/lib/ocf/resource.d/heartbeat/mysql-proxy CONFIG - #AgentRoot /usr/lib/ocf/resource.d/heartbeat + AgentRoot /usr/lib/ocf/resource.d/ipax/ InstallPackage mysql-proxy HangTimeout 20 SETUP-AGENT # nothing CASE-BLOCK crm_setting Var OCF_RESKEY_CRM_meta_timeout=15000 Var OCF_RESKEY_binary=/tmp/mysql-proxy Var OCF_RESKEY_admin_username=root Var OCF_RESKEY_admin_password=test123 Var OCF_RESKEY_admin_lua_script=/usr/lib/mysql-proxy/lua/admin.lua CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare + Bash [ ! -x /tmp/mysql-proxy ] && ln -s `which mysql-proxy` /tmp/mysql-proxy || true Include crm_setting - Include default_status + +CASE-BLOCK teardown + AgentRun stop + BashAtExit rm -f /tmp/mysql-proxy CASE "check base env" Include prepare - Bash [ ! -x /tmp/mysql-proxy ] && ln -s `which mysql-proxy` /tmp/mysql-proxy || true AgentRun start OCF_SUCCESS - BashAtExit rm -f /tmp/mysql-proxy + Include teardown CASE "check base env: invalid 'OCF_RESKEY_binary'" Include prepare Var OCF_RESKEY_binary=no_such AgentRun start OCF_ERR_INSTALLED + BashAtExit rm -f /tmp/mysql-proxy CASE "normal start" Include prepare - Bash [ ! -x /tmp/mysql-proxy ] && ln -s `which mysql-proxy` /tmp/mysql-proxy || true AgentRun start OCF_SUCCESS - BashAtExit rm -f /tmp/mysql-proxy + Include teardown CASE "normal stop" Include prepare - Bash [ ! -x /tmp/mysql-proxy ] && ln -s `which mysql-proxy` /tmp/mysql-proxy || true AgentRun start AgentRun stop OCF_SUCCESS - BashAtExit rm -f /tmp/mysql-proxy + Include teardown CASE "double start" Include prepare - Bash [ ! -x /tmp/mysql-proxy ] && ln -s `which mysql-proxy` /tmp/mysql-proxy || true AgentRun start AgentRun start OCF_SUCCESS - BashAtExit rm -f /tmp/mysql-proxy + Include teardown CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS CASE "running monitor" Include prepare - Bash [ ! -x /tmp/mysql-proxy ] && ln -s `which mysql-proxy` /tmp/mysql-proxy || true AgentRun start AgentRun monitor OCF_SUCCESS - BashAtExit rm -f /tmp/mysql-proxy + Include teardown CASE "not running monitor" Include prepare AgentRun monitor OCF_NOT_RUNNING CASE "unimplemented command" Include prepare AgentRun no_cmd OCF_ERR_UNIMPLEMENTED