diff --git a/tools/ocft/Makefile.am b/tools/ocft/Makefile.am index be266aaf9..97c2d96c7 100644 --- a/tools/ocft/Makefile.am +++ b/tools/ocft/Makefile.am @@ -1,44 +1,45 @@ # 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 \ Filesystem \ LVM \ IPsrcaddr \ MailTo \ mysql \ pgsql \ db2 \ nfsserver \ portblock \ iscsi \ + named \ postfix \ SendArp ocftdir = $(datadir)/$(PACKAGE_NAME)/ocft ocft_DATA = README \ README.zh_CN \ caselib diff --git a/tools/ocft/named b/tools/ocft/named new file mode 100644 index 000000000..7785eba9f --- /dev/null +++ b/tools/ocft/named @@ -0,0 +1,66 @@ +#named + +# To work properly this test requires that standard bind and bin-utils +# packages installed. + +CONFIG + InstallPackage bind + InstallPackage bind-utils +SETUP-AGENT + /etc/init.d/named start + /etc/init.d/named stop + +CASE-BLOCK crm_setting + Var OCF_RESKEY_CRM_meta_timeout=15000 + +CASE-BLOCK default_status + AgentRun stop + +CASE-BLOCK prepare + Include crm_setting + Include default_status + +CASE "check base env" + Include prepare + AgentRun start OCF_SUCCESS + +CASE "check base env: invalid 'OCF_RESKEY_named'" + Include prepare + Var OCF_RESKEY_named=no_such + AgentRun start OCF_ERR_INSTALLED + +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 "running monitor" + Include prepare + AgentRun start + AgentRun monitor OCF_SUCCESS + +CASE "not running monitor" + Include prepare + AgentRun monitor OCF_NOT_RUNNING + +CASE "unimplemented command" + Include prepare + AgentRun no_cmd OCF_ERR_UNIMPLEMENTED + +CASE "non-existent user" + Include prepare + Var OCF_RESKEY_named_user=no_user + AgentRun start OCF_ERR_INSTALLED