Skip to content

Commit 2bb85fd

Browse files
committed
test: add missing error checks in cache tests
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
1 parent 7021321 commit 2bb85fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cdi/cache_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ devices:
177177
}
178178
} else {
179179
dir, err = mkTestDir(t, nil)
180+
if err != nil {
181+
t.Errorf("failed to create test directory: %v", err)
182+
return
183+
}
180184
}
181185

182186
cache, err = NewCache(WithSpecDirs(
@@ -554,6 +558,7 @@ devices:
554558
opts = append(opts, WithAutoRefresh(false))
555559
}
556560
cache, err = NewCache(opts...)
561+
require.NoError(t, err)
557562
require.NotNil(t, cache)
558563
} else {
559564
err = updateSpecDirs(t, dir, update.etc, update.run)

0 commit comments

Comments
 (0)