You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expectedErrors []error// Now expecting a slice of error messages
24
24
}{
25
25
{
26
-
name: "valid with all required filled",
27
-
filename: "all-required-app.yaml",
28
-
expectedErr: nil,
26
+
name: "valid with all required filled",
27
+
filename: "all-required-app.yaml",
28
+
expectedErrors: nil,
29
29
},
30
30
{
31
-
name: "valid with missing bricks",
32
-
filename: "no-bricks-app.yaml",
33
-
expectedErr: nil,
31
+
name: "valid with missing bricks",
32
+
filename: "no-bricks-app.yaml",
33
+
expectedErrors: nil,
34
34
},
35
35
{
36
-
name: "valid with empty list of bricks",
37
-
filename: "empty-bricks-app.yaml",
38
-
expectedErr: nil,
36
+
name: "valid with empty list of bricks",
37
+
filename: "empty-bricks-app.yaml",
38
+
expectedErrors: nil,
39
39
},
40
40
{
41
-
name: "valid if required variable is empty string",
42
-
filename: "empty-required-app.yaml",
43
-
expectedErr: nil,
41
+
name: "valid if required variable is empty string",
42
+
filename: "empty-required-app.yaml",
43
+
expectedErrors: nil,
44
44
},
45
45
{
46
-
name: "invalid if required variable is omitted",
47
-
filename: "omitted-required-app.yaml",
48
-
expectedErr: f.Ptr("variable \"ARDUINO_DEVICE_ID\" is required by brick \"arduino:arduino_cloud\"\nvariable \"ARDUINO_SECRET\" is required by brick \"arduino:arduino_cloud\""),
46
+
name: "invalid if required variable is omitted",
47
+
filename: "omitted-required-app.yaml",
48
+
expectedErrors: []error{
49
+
errors.New("variable \"ARDUINO_DEVICE_ID\" is required by brick \"arduino:arduino_cloud\""),
50
+
errors.New("variable \"ARDUINO_SECRET\" is required by brick \"arduino:arduino_cloud\""),
51
+
},
49
52
},
50
53
{
51
-
name: "invalid if a required variable among two is omitted",
52
-
filename: "omitted-mixed-required-app.yaml",
53
-
expectedErr: f.Ptr("variable \"ARDUINO_SECRET\" is required by brick \"arduino:arduino_cloud\""),
54
+
name: "invalid if a required variable among two is omitted",
55
+
filename: "omitted-mixed-required-app.yaml",
56
+
expectedErrors: []error{
57
+
errors.New("variable \"ARDUINO_SECRET\" is required by brick \"arduino:arduino_cloud\""),
58
+
},
54
59
},
55
60
{
56
-
name: "invalid if brick id not found",
57
-
filename: "not-found-brick-app.yaml",
58
-
expectedErr: f.Ptr("brick \"arduino:not_existing_brick\" not found"),
61
+
name: "invalid if brick id not found",
62
+
filename: "not-found-brick-app.yaml",
63
+
expectedErrors: []error{
64
+
errors.New("brick \"arduino:not_existing_brick\" not found"),
65
+
},
59
66
},
60
67
{
61
-
name: "invalid if variable does not exist in the brick",
62
-
filename: "not-found-variable-app.yaml",
63
-
expectedErr: f.Ptr("variable \"NOT_EXISTING_VARIABLE\" does not exist on brick \"arduino:arduino_cloud\""),
68
+
name: "invalid if variable does not exist in the brick",
69
+
filename: "not-found-variable-app.yaml",
70
+
expectedErrors: []error{
71
+
errors.New("variable \"NOT_EXISTING_VARIABLE\" does not exist on brick \"arduino:arduino_cloud\""),
0 commit comments