@@ -23,27 +23,33 @@ func TestValidateAppDescriptorBricks(t *testing.T) {
2323 expectedErr * string
2424 }{
2525 {
26- name : "valid app descriptor with no bricks" ,
26+ name : "valid with missing bricks" ,
2727 filename : "no-bricks-app.yaml" ,
2828 expectedErr : nil ,
2929 },
3030 {
31- name : "valid app descriptor with empty list of bricks" ,
31+ name : "valid with empty list of bricks" ,
3232 filename : "empty-bricks-app.yaml" ,
3333 expectedErr : nil ,
3434 },
3535 {
36- name : "invalid app descriptor with missing required variable" ,
37- filename : "missing-required-app.yaml" ,
36+ name : "valid if required variable is empty string" ,
37+ filename : "empty-required-app.yaml" ,
38+ expectedErr : nil ,
39+ },
40+ {
41+ name : "invalid if required variable is omitted" ,
42+ filename : "omitted-required-app.yaml" ,
3843 expectedErr : f .Ptr ("variable \" ARDUINO_DEVICE_ID\" is required by brick \" arduino:arduino_cloud\" " ),
3944 },
4045 {
41- name : "invalid app descriptor with a missing required variable among two" ,
42- filename : "mixed-required-app.yaml" ,
46+ name : "invalid if required variable among two is omitted " ,
47+ filename : "omitted- mixed-required-app.yaml" ,
4348 expectedErr : f .Ptr ("variable \" ARDUINO_SECRET\" is required by brick \" arduino:arduino_cloud\" " ),
4449 },
50+
4551 {
46- name : "invalid app descriptor with not found brick id " ,
52+ name : "invalid if brick id not found" ,
4753 filename : "not-found-brick-app.yaml" ,
4854 expectedErr : f .Ptr ("brick \" arduino:not_existing_brick\" not found" ),
4955 },
0 commit comments