diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-21 15:47:01 +0100 |
---|---|---|
committer | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-22 13:15:28 +0100 |
commit | 06dd9136a253521cb74497a59f2e6894806a5b6d (patch) | |
tree | d6728a4ffd1d15b5abe415b5574bfdab14eb7fea /test/utils/common_function_test.go | |
parent | 6c030cd5737a6257e9b7ee2db232a24ccef294de (diff) | |
download | podman-06dd9136a253521cb74497a59f2e6894806a5b6d.tar.gz podman-06dd9136a253521cb74497a59f2e6894806a5b6d.tar.bz2 podman-06dd9136a253521cb74497a59f2e6894806a5b6d.zip |
fix a number of errcheck issues
Numerous issues remain, especially in tests/e2e.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'test/utils/common_function_test.go')
-rw-r--r-- | test/utils/common_function_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
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 |