Skip to content

Commit 5df0ca5

Browse files
committed
improve code coverage
Signed-off-by: Joe Lanford <[email protected]>
1 parent 5b656a1 commit 5df0ca5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/declcfg/load_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package declcfg
33
import (
44
"encoding/json"
55
"io/fs"
6+
"os"
67
"testing"
78
"testing/fstest"
89

@@ -99,10 +100,15 @@ func TestLoadFS(t *testing.T) {
99100
}
100101
specs := []spec{
101102
{
102-
name: "Error/NonExistentDir",
103+
name: "Error/NilFS",
103104
fsys: nil,
104105
assertion: require.Error,
105106
},
107+
{
108+
name: "Error/NonExistentDir",
109+
fsys: os.DirFS("non/existent/dir/"),
110+
assertion: require.Error,
111+
},
106112
{
107113
name: "Error/Invalid",
108114
fsys: invalidFS,

0 commit comments

Comments
 (0)