diff --git a/tools/ocft/Makefile.am b/tools/ocft/Makefile.am index c91f2388a..0031b551a 100644 --- a/tools/ocft/Makefile.am +++ b/tools/ocft/Makefile.am @@ -1,48 +1,49 @@ # Author: John Shi # jshi@suse.de # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(ocftcfgs_DATA) $(ocft_DATA) sbin_SCRIPTS = ocft ocftcfgsdir = $(datadir)/$(PACKAGE_NAME)/ocft/configs ocftcfgs_DATA = apache \ IPaddr2 \ IPv6addr \ Filesystem \ LVM \ IPsrcaddr \ MailTo \ mysql \ pgsql \ db2 \ + oracle \ drbd.linbit \ nfsserver \ portblock \ iscsi \ named \ postfix \ Xinetd \ SendArp ocftdir = $(datadir)/$(PACKAGE_NAME)/ocft ocft_DATA = README \ README.zh_CN \ caselib diff --git a/tools/ocft/oracle b/tools/ocft/oracle new file mode 100644 index 000000000..6f145c7d6 --- /dev/null +++ b/tools/ocft/oracle @@ -0,0 +1,81 @@ +# oracle +# (based on db2) +# +# Created on an SLE11SP2 running oracle 11g +# database sid is orcl +# adapt this in set_testenv below +# TODO: need oracle expert to break it, then test it +# + +CONFIG + Agent oracle + AgentRoot /usr/lib/ocf/resource.d/heartbeat + HangTimeout 40 + +SETUP-AGENT + # nothing + +CASE-BLOCK set_testenv + Env OCFT_sid=orcl + +CASE-BLOCK crm_setting + Env OCF_RESKEY_sid=$OCFT_sid + Env OCF_RESKEY_CRM_meta_timeout=30000 + +CASE-BLOCK default_status + AgentRun stop + +CASE-BLOCK prepare + Include set_testenv + Include crm_setting + Include default_status + +CASE "check base env" + Include prepare + AgentRun start OCF_SUCCESS + +CASE "check base env: no 'OCF_RESKEY_sid'" + Include prepare + Env OCF_RESKEY_sid= + AgentRun start OCF_ERR_CONFIGURED + +CASE "check base env: invalid 'OCF_RESKEY_home'" + Include prepare + Env OCF_RESKEY_home=/no_such + AgentRun start OCF_ERR_INSTALLED + +CASE "unimplemented command" + Include prepare + AgentRun no_cmd OCF_ERR_UNIMPLEMENTED + +CASE "normal start" + Include prepare + AgentRun start OCF_SUCCESS + +CASE "normal stop" + Include prepare + AgentRun start + AgentRun stop OCF_SUCCESS + +CASE "double start" + Include prepare + AgentRun start + AgentRun start OCF_SUCCESS + +CASE "double stop" + Include prepare + AgentRun stop OCF_SUCCESS + +CASE "started: monitor" + Include prepare + AgentRun start + AgentRun monitor OCF_SUCCESS + +CASE "not started: monitor" + Include prepare + AgentRun monitor OCF_NOT_RUNNING + +CASE "try different ipcrm method" + Include prepare + Env OCF_RESKEY_ipcrm=none + AgentRun start OCF_SUCCESS