mirror of
https://github.com/ceph/go-ceph
synced 2024-12-22 06:10:09 +00:00
87f4563118
Signed-off-by: Sven Anderson <sven@redhat.com>
32 lines
697 B
Go
32 lines
697 B
Go
//go:build !nautilus
|
|
// +build !nautilus
|
|
|
|
package rados
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func (suite *RadosTestSuite) TestSetUnsetPoolFullTry() {
|
|
suite.SetupConnection()
|
|
suite.T().Run("invalidIOContext", func(t *testing.T) {
|
|
ioctx := &IOContext{}
|
|
err := ioctx.SetPoolFullTry()
|
|
assert.Error(t, err)
|
|
err = ioctx.UnsetPoolFullTry()
|
|
assert.Error(t, err)
|
|
})
|
|
|
|
suite.T().Run("validIOContext", func(t *testing.T) {
|
|
ioctx, err := suite.conn.OpenIOContext(suite.pool)
|
|
require.NoError(suite.T(), err)
|
|
err = ioctx.SetPoolFullTry()
|
|
assert.NoError(t, err)
|
|
err = ioctx.UnsetPoolFullTry()
|
|
assert.NoError(t, err)
|
|
})
|
|
}
|