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
require.Error(t, err, "got no error, expected %q", wantErr)
115
154
require.Nil(t, parsed)
116
155
assert.Equal(t, wantErr, err.Error())
156
+
ifschema=="" {
157
+
return
158
+
}
159
+
160
+
// schema validation
161
+
162
+
err=ValidateYAML(fileContent, schema)
163
+
iferrors.Is(err, fs.ErrNotExist) {
164
+
// XXX: ignore missing schema, for now
165
+
return
166
+
}
167
+
168
+
// a "schemaErr" comment must be present, even if empty
169
+
require.True(t, hasWantSchemaErr, "invalid configurations require an exlicit schemaErr comment. it can be empty string if the schema cannot detect the issue")
170
+
switch {
171
+
caseerr==nil&&wantSchemaErr!="":
172
+
require.Error(t, err, "got no schema error, expected %q", wantSchemaErr)
0 commit comments