summaryrefslogtreecommitdiff
path: root/test/utils/common_function_test.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-03-21 13:47:59 +0100
committerValentin Rothberg <vrothberg@redhat.com>2022-03-22 13:04:35 +0100
commitf72a678f2a06697ff42e1fe5636cb09b47a25b49 (patch)
tree8f6f5c210d474086f70b826118cd6558ee8fc4e3 /test/utils/common_function_test.go
parentbb6b69b4abe86601a8438a6708263174879b5c51 (diff)
downloadpodman-f72a678f2a06697ff42e1fe5636cb09b47a25b49.tar.gz
podman-f72a678f2a06697ff42e1fe5636cb09b47a25b49.tar.bz2
podman-f72a678f2a06697ff42e1fe5636cb09b47a25b49.zip
linter: enable errchkjson
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.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/utils/common_function_test.go b/test/utils/common_function_test.go
index 810d9f2a5..144d8d4f1 100644
--- a/test/utils/common_function_test.go
+++ b/test/utils/common_function_test.go
@@ -102,9 +102,10 @@ var _ = Describe("Common functions test", func() {
Item2: []string{"test"},
}
- testByte, _ := json.Marshal(testData)
- err := WriteJSONFile(testByte, "/tmp/testJSON")
+ testByte, err := json.Marshal(testData)
+ Expect(err).To(BeNil(), "Failed to marshal data.")
+ err = WriteJSONFile(testByte, "/tmp/testJSON")
Expect(err).To(BeNil(), "Failed to write JSON to file.")
read, err := os.Open("/tmp/testJSON")