File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -308,16 +308,14 @@ func TestFromYAMLFile(t *testing.T) {
308308 })
309309
310310 t .Run ("Non-existent file" , func (t * testing.T ) {
311- var config struct { validateValid }
312311 var pathError * fs.PathError
313312
314- err := FromYAMLFile ("nonexistent.yaml" , & config )
313+ err := FromYAMLFile ("nonexistent.yaml" , & validateValid {} )
315314 require .ErrorAs (t , err , & pathError )
316315 require .ErrorIs (t , pathError .Err , fs .ErrNotExist )
317316 })
318317
319318 t .Run ("Permission denied" , func (t * testing.T ) {
320- var config struct { validateValid }
321319 var pathError * fs.PathError
322320
323321 yamlFile , err := os .CreateTemp ("" , "*.yaml" )
@@ -328,7 +326,7 @@ func TestFromYAMLFile(t *testing.T) {
328326 _ = os .Remove (name )
329327 }(yamlFile .Name ())
330328
331- err = FromYAMLFile (yamlFile .Name (), & config )
329+ err = FromYAMLFile (yamlFile .Name (), & validateValid {} )
332330 require .ErrorAs (t , err , & pathError )
333331 })
334332}
You can’t perform that action at this time.
0 commit comments