mirror of
https://github.com/ceph/go-ceph
synced 2024-12-22 22:24:03 +00:00
rbd: check that encode calls dont return error
Don't ignore the error returned by json encode func call. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
8ce5fa5fc7
commit
0faccb56e8
@ -535,7 +535,7 @@ func TestIOReaderWriter(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
encoder := json.NewEncoder(img)
|
||||
encoder.Encode(stats)
|
||||
assert.NoError(t, encoder.Encode(stats))
|
||||
|
||||
err = img.Flush()
|
||||
assert.NoError(t, err)
|
||||
@ -545,7 +545,7 @@ func TestIOReaderWriter(t *testing.T) {
|
||||
|
||||
var stats2 *ImageInfo
|
||||
decoder := json.NewDecoder(img)
|
||||
decoder.Decode(&stats2)
|
||||
assert.NoError(t, decoder.Decode(&stats2))
|
||||
|
||||
assert.Equal(t, &stats, &stats2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user