rados: check errors returned by Write calls

Don't ignore errors returned by ioctx Write function calls.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-04-08 16:39:08 -04:00 committed by John Mulligan
parent 38adf053dd
commit c4f8f0445a

View File

@ -230,7 +230,8 @@ func (suite *RadosTestSuite) TestGetClusterStats() {
buf := make([]byte, 1<<20)
for i := 0; i < 10; i++ {
objname := suite.GenObjectName()
suite.ioctx.Write(objname, buf, 0)
err = suite.ioctx.Write(objname, buf, 0)
assert.NoError(suite.T(), err)
}
// wait a while for the stats to change
@ -560,7 +561,8 @@ func (suite *RadosTestSuite) TestGetPoolStats() {
buf := make([]byte, 1<<20)
for i := 0; i < 10; i++ {
oid := suite.GenObjectName()
suite.ioctx.Write(oid, buf, 0)
err = suite.ioctx.Write(oid, buf, 0)
assert.NoError(suite.T(), err)
}
// wait a while for the stats to change