rados: add test coverage for failure to open io context

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2019-12-20 14:34:14 -05:00 committed by Niels de Vos
parent dd1e25e5a4
commit b8f04da105
1 changed files with 6 additions and 0 deletions

View File

@ -1150,6 +1150,12 @@ func (suite *RadosTestSuite) TestOmapOnNonexistentObjectError() {
assert.Equal(suite.T(), err, RadosErrorNotFound)
}
func (suite *RadosTestSuite) TestOpenIOContextInvalidPool() {
ioctx, err := suite.conn.OpenIOContext("cmartel")
require.Error(suite.T(), err)
require.Nil(suite.T(), ioctx)
}
func TestRadosTestSuite(t *testing.T) {
suite.Run(t, new(RadosTestSuite))
}