update testcase for xcatstanzafile

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11008 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
amy0701 2011-11-15 07:11:10 +00:00
parent 47840ae1ba
commit 1a1158403c

View File

@ -1,4 +1,5 @@
start:xcatstanzafile_normal
os:Linux
description:xcatstanzafile in normal format
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
@ -12,6 +13,23 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_normal
os:Aix
description:xcatstanzafile in normal format
cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.p
pd.pok.com" > testfile
check:rc==0
cmd:cat testfile|chdef -z
check:rc==0
cmd:lsdef testnode
check:output=~(groups=all,compute)
check:output=~xcatmaster=MS02.ppd.pok.com
check:output=~nfsserver=IS227.ppd.pok.com
cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_colon
description:xcatstanzafile's header without colon
cmd:echo -e "default-node:\n groups=all,compute\ntestnode\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
@ -74,6 +92,7 @@ end
start:xcatstanzafile_tab
os:Linux
description:xcatstanzafile,line with tab and space
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster = MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
@ -83,8 +102,21 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_tab
os:Aix
description:xcatstanzafile,line with tab and space
cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster = MS02.ppd.pok.com\n nfsserver=
IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|mkdef -z
check:rc==0
cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_multattr
os:Linux
description:xcatstanzafile,line with multiple attribute
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster= MS02.ppd.pok.com nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
@ -96,8 +128,24 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_multattr
os:Aix
description:xcatstanzafile,line with multiple attribute
cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster= MS02.ppd.pok.com nfsserver=IS227.ppd.pok.
com" > testfile
check:rc==0
cmd:cat testfile|mkdef -z
check:rc==0
cmd:lsdef testnode
check:output=~\s*xcatmaster=MS02.ppd.pok.com\s*nfsserver=IS227.ppd.pok.com
cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_defaultvalue
os:Linux
description:xcatstanzafile,If the header name is ``default-<object type>:'' the attribute values in the stanza are considered default values for subsequent definitions in the file that are the same object type.
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster= MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
@ -109,6 +157,21 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_defaultvalue
os:Aix
description:xcatstanzafile,If the header name is ``default-<object type>:'' the attribute values in the stanza are considered default va
lues for subsequent definitions in the file that are the same object type.
cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster= MS02.ppd.pok.com\n nfsserver=IS227.
ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|mkdef -z
check:rc==0
cmd:lsdef testnode
check:output=~(groups=all,compute)
cmd:rmdef -t node testnode
cmd:rm -f testfile
end
start:xcatstanzafile_specificvalue
description:When a specific value for an attribute is provided in the stanza, it takes priority over any default value that had been set.