diff --git a/xCAT-test/autotest/testcase/chdef/cases0 b/xCAT-test/autotest/testcase/chdef/cases0 index f3ad24b73..26db07053 100644 --- a/xCAT-test/autotest/testcase/chdef/cases0 +++ b/xCAT-test/autotest/testcase/chdef/cases0 @@ -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 diff --git a/xCAT-test/autotest/testcase/rmdef/cases0 b/xCAT-test/autotest/testcase/rmdef/cases0 index 8a6b9f51c..50bbe14e9 100644 --- a/xCAT-test/autotest/testcase/rmdef/cases0 +++ b/xCAT-test/autotest/testcase/rmdef/cases0 @@ -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 +check:rc==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