Skip to content

Commit ae1498f

Browse files
Catch possible mkdir error
1 parent a0df4af commit ae1498f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/e2e/suit_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ func writePodLogs(ctx context.Context, podNamespace string, podName string) {
301301
Expect(err).NotTo(HaveOccurred())
302302
dir := filepath.Join("logs", podNamespace)
303303
if _, err := os.Stat(dir); os.IsNotExist(err) {
304-
os.MkdirAll(dir, 0755)
304+
err = os.MkdirAll(dir, 0755)
305+
Expect(err).NotTo(HaveOccurred())
305306
}
306307
err = os.WriteFile(filepath.Join(dir, fmt.Sprintf("%s.log", podName)), bytes, 0644)
307308
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)