diff --git a/xCAT-test/autotest/testcase/nodepurge/cases0 b/xCAT-test/autotest/testcase/nodepurge/cases0 new file mode 100644 index 000000000..c26f63271 --- /dev/null +++ b/xCAT-test/autotest/testcase/nodepurge/cases0 @@ -0,0 +1,59 @@ +start:nodepurge_noderange +description:nodepurge testnode1,testnode2 +label:mn_only,ci_test,db +cmd:mkdef -t node -o testnode1 arch=ppc64le cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:01 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 +check:rc==0 +cmd:mkdef -t node -o testnode2 arch=ppc64le cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.201 mac=e6:d4:d2:3a:ad:02 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 +check:rc==0 +cmd:lsdef -t node testnode1,testnode2 +check:output=~testnode1 +check:output=~testnode2 +cmd:makehosts testnode1,testnode2 +check:rc==0 +cmd:nodeset testnode1,testnode2 osimage=rhels7.7-ppc64le-install-compute +check:rc==0 +cmd:nodepurge testnode1,testnode2 +check:rc==0 +cmd:lsdef -t node testnode1,testnode2 +check:output=~Could not find an object named 'testnode1' of type 'node'. +check:output=~Could not find an object named 'testnode2' of type 'node'. +cmd:ls /install/autoinst/testnode1* +check:output=~No such file or directory +cmd:ls /install/autoinst/testnode2* +check:output=~No such file or directory +cmd:ping testnode1 +check:output=~Name or service not known +cmd:ping testnode2 +check:output=~Name or service not known +end + +start:nodepurge_h +description:nodepurge -h +label:mn_only,ci_test,db +cmd:nodepurge -h +check:output=~Usage +cmd:nodepurge --help +check:output=~Usage +end + +start:nodepurge_null +description:nodepurge +label:mn_only,ci_test,db +cmd:nodepurge +check:output=~Usage +end + +start:nodepurge_err_node +description:nodepurge err +label:mn_only,ci_test,db +cmd:rmdef -t node testnode +cmd:nodepurge testnode +check:rc!=0 +check:output=~Invalid nodes and/or groups in noderange: testnode +end + + + + + +