Skip to content

Commit

Permalink
[Group] [Yaml] Add error if GroupId field isn't used properly in yaml…
Browse files Browse the repository at this point in the history
… test (#14614)

* Add error if GroupId field isn't use properly
  • Loading branch information
jepenven-silabs authored Feb 2, 2022
1 parent 1ae483d commit 2a6dc3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/zap-templates/common/ClusterTestGeneration.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ function setDefaultTypeForCommand(test)
break;
}

// Sanity Check for GroupId usage
// Only two types of actions can be send to Group : Write attribute, and Commands
// Spec : Action 8.2.4
if ((kGroupId in test) && !test.isGroupCommand) {
printErrorAndExit(this, 'Wrong Yaml configuration. Action : ' + test.commandName + " can't be sent to group " + test[kGroupId]);
}

test.isWait = false;
}

Expand Down

0 comments on commit 2a6dc3e

Please sign in to comment.