From 06dd9136a253521cb74497a59f2e6894806a5b6d Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 21 Mar 2022 15:47:01 +0100 Subject: fix a number of errcheck issues Numerous issues remain, especially in tests/e2e. Signed-off-by: Valentin Rothberg --- test/utils/common_function_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/utils/common_function_test.go') diff --git a/test/utils/common_function_test.go b/test/utils/common_function_test.go index 144d8d4f1..6323b44eb 100644 --- a/test/utils/common_function_test.go +++ b/test/utils/common_function_test.go @@ -51,7 +51,8 @@ var _ = Describe("Common functions test", func() { txt := fmt.Sprintf("ID=%s\nVERSION_ID=%s", id, ver) if !empty { f, _ := os.Create(path) - f.WriteString(txt) + _, err := f.WriteString(txt) + Expect(err).To(BeNil(), "Failed to write data.") f.Close() } @@ -136,7 +137,8 @@ var _ = Describe("Common functions test", func() { } if createFile { f, _ := os.Create(path) - f.WriteString(txt) + _, err := f.WriteString(txt) + Expect(err).To(BeNil(), "Failed to write data.") f.Close() } ProcessOneCgroupPath = path -- cgit v1.2.3-54-g00ecf