2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Improvement on the warning message and enhancement on the test case

This commit is contained in:
Wai Yee Wong 2022-05-02 16:42:53 -04:00
parent c51c0d00ce
commit 1205d6d983
2 changed files with 10 additions and 5 deletions

View File

@ -295,8 +295,8 @@ sub expandatom {
for my $row (@grplist) {
if ($row->{groupname} eq $atom) {
my $rsp;
$rsp->{data}->[0] = "$atom is a defined group name, so Node $atom is not created.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
$rsp->{data}->[0] = "Could not create an object named \'$atom\' of type 'node'. A definition for a group object with the same name already exists.";
xCAT::MsgUtils->message("W", $rsp, $::callback);
return ();
}
}

View File

@ -156,11 +156,16 @@ cmd:mkdef -t group -o tempgroup13579
check:rc==0
cmd:mkdef -t node -o tempgroup13579 groups=tempgroup13579
check:rc==1
check:output=~a defined group name
check:output=~A definition for a group object with the same name already exists.
check:output=~No object names were provided
cmd:mkdef -t node -o tempnode02468,tempgroup13579 groups=tempgroup13579
cmd:mkdef -t node -o tempgroup13579 groups=all
check:rc==1
check:output=~a defined group name
check:output=~A definition for a group object with the same name already exists.
check:output=~No object names were provided
#cmd:mkdef -t node -o tempnode02468,tempgroup13579 groups=tempgroup13579
cmd:mkdef -t node -o tempgroup13579,tempnode02468 groups=tempgroup13579
check:rc==0
check:output=~A definition for a group object with the same name already exists.
check:output=~1 object definitions have been created
cmd:rmdef -t node -o tempnode02468
check:rc==0