go-ceph/cephfs/conn_nautilus_test.go
John Mulligan e79f1d786f cephfs: remove luminous and mimic build tags
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 01:24:01 +00:00

33 lines
687 B
Go

package cephfs
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetFsCid(t *testing.T) {
t.Run("unmounted", func(t *testing.T) {
mount, err := CreateMount()
defer func() { assert.NoError(t, mount.Release()) }()
require.NoError(t, err)
require.NotNil(t, mount)
err = mount.ReadDefaultConfigFile()
require.NoError(t, err)
cid, err := mount.GetFsCid()
assert.Error(t, err)
assert.Equal(t, cid, int64(0))
})
t.Run("mounted", func(t *testing.T) {
mount := fsConnect(t)
defer fsDisconnect(t, mount)
cid, err := mount.GetFsCid()
assert.NoError(t, err)
assert.GreaterOrEqual(t, cid, int64(0))
})
}