@@ -98,7 +98,7 @@ func TestGetOverlayExtendsPath_Error(t *testing.T) {
9898
9999 result , err := GetOverlayExtendsPath (tt .overlay )
100100
101- assert .Error (t , err , "should return error" )
101+ require .Error (t , err , "should return error" )
102102 assert .Empty (t , result , "should return empty path on error" )
103103 assert .Contains (t , err .Error (), tt .wantErrorMsg , "error should contain expected message" )
104104 })
@@ -155,7 +155,7 @@ func TestLoadSpecification_Error_FileNotFound(t *testing.T) {
155155
156156 result , err := LoadSpecification ("nonexistent-file.yaml" )
157157
158- assert .Error (t , err , "should return error for nonexistent file" )
158+ require .Error (t , err , "should return error for nonexistent file" )
159159 assert .Nil (t , result , "should return nil node on error" )
160160 assert .Contains (t , err .Error (), "failed to open schema" , "error should mention opening failure" )
161161}
@@ -170,7 +170,7 @@ func TestLoadSpecification_Error_InvalidYAML(t *testing.T) {
170170
171171 result , err := LoadSpecification (testFile )
172172
173- assert .Error (t , err , "should return error for invalid YAML" )
173+ require .Error (t , err , "should return error for invalid YAML" )
174174 assert .Nil (t , result , "should return nil node on error" )
175175 assert .Contains (t , err .Error (), "failed to parse schema" , "error should mention parsing failure" )
176176}
@@ -210,7 +210,7 @@ func TestLoadExtendsSpecification_Error_NoExtends(t *testing.T) {
210210
211211 result , err := LoadExtendsSpecification (o )
212212
213- assert .Error (t , err , "should return error when extends is empty" )
213+ require .Error (t , err , "should return error when extends is empty" )
214214 assert .Nil (t , result , "should return nil node on error" )
215215 assert .Contains (t , err .Error (), "overlay does not specify an extends URL" , "error should mention missing extends" )
216216}
@@ -224,7 +224,7 @@ func TestLoadExtendsSpecification_Error_InvalidURL(t *testing.T) {
224224
225225 result , err := LoadExtendsSpecification (o )
226226
227- assert .Error (t , err , "should return error for non-file URL" )
227+ require .Error (t , err , "should return error for non-file URL" )
228228 assert .Nil (t , result , "should return nil node on error" )
229229 assert .Contains (t , err .Error (), "only file:// extends URLs are supported" , "error should mention unsupported URL scheme" )
230230}
@@ -238,7 +238,7 @@ func TestLoadExtendsSpecification_Error_FileNotFound(t *testing.T) {
238238
239239 result , err := LoadExtendsSpecification (o )
240240
241- assert .Error (t , err , "should return error for nonexistent file" )
241+ require .Error (t , err , "should return error for nonexistent file" )
242242 assert .Nil (t , result , "should return nil node on error" )
243243 assert .Contains (t , err .Error (), "failed to open schema" , "error should mention file opening failure" )
244244}
@@ -306,7 +306,7 @@ func TestLoadEitherSpecification_Error_NoPathNoExtends(t *testing.T) {
306306
307307 result , name , err := LoadEitherSpecification ("" , o )
308308
309- assert .Error (t , err , "should return error when neither path nor extends provided" )
309+ require .Error (t , err , "should return error when neither path nor extends provided" )
310310 assert .Nil (t , result , "should return nil node on error" )
311311 assert .Empty (t , name , "should return empty name on error" )
312312}
@@ -318,7 +318,7 @@ func TestLoadEitherSpecification_Error_InvalidPath(t *testing.T) {
318318
319319 result , name , err := LoadEitherSpecification ("nonexistent-file.yaml" , o )
320320
321- assert .Error (t , err , "should return error for invalid path" )
321+ require .Error (t , err , "should return error for invalid path" )
322322 assert .Nil (t , result , "should return nil node on error" )
323323 assert .Equal (t , "nonexistent-file.yaml" , name , "should return attempted path as name" )
324324}
0 commit comments