Skip to content

Commit 2ee29d0

Browse files
committed
config: Simplify Non-existent file test
1 parent 7ce6022 commit 2ee29d0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

config/config_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,8 @@ func TestFromYAMLFile(t *testing.T) {
301301
})
302302

303303
t.Run("Non-existent file", func(t *testing.T) {
304-
var pathError *fs.PathError
305-
306304
err := FromYAMLFile("nonexistent.yaml", &validateValid{})
307-
require.ErrorAs(t, err, &pathError)
308-
require.ErrorIs(t, pathError.Err, fs.ErrNotExist)
305+
require.ErrorIs(t, err, fs.ErrNotExist)
309306
})
310307

311308
t.Run("Permission denied", func(t *testing.T) {

0 commit comments

Comments
 (0)