2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 19:52:03 +00:00

complete chdef mkdef cases

This commit is contained in:
caomengmeng 2016-07-04 23:41:40 -04:00
parent acd85daaf3
commit f635ae9fcc
2 changed files with 27 additions and 0 deletions

View File

@ -222,3 +222,20 @@ cmd:chdef -t wrongtype -o testnode groups=all,aix
check:rc!=0
check:output=~not a valid
end
start:chdef_template
os:linux
description:try to change a template, a new node is created according to chdef.
cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi
cmd:chdef -t node -o switch-template groups=test
check:output=~1 object definitions have been created or modified
check:output=~New object definitions \'switch-template\' have been created
check:rc==0
cmd:lsdef switch-template
check:output=~Object name\: switch\-template
check:output=~groups\=test
check:rc==0
cmd:noderm switch-template
check:rc==0
end

View File

@ -128,3 +128,13 @@ cmd:rmdef -t wrongtype -o testnode
check:rc!=0
check:output=~not a valid
end
start:rmdef_template
os:linux
description:try to delete a template, then error messages appear
cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi
cmd:rmdef switch-template
checkrc==1
check:output=~Error\: Could not find an object named \'switch-template\' of type \'node\'
check:output=~No objects have been removed from the xCAT database.
end