mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cephfs: address golangci-lint issues
address golangci-lint issues in cephfs related code. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
6961b103b8
commit
a362ef6bd4
@ -81,7 +81,7 @@ func (m *kernelMounter) mountKernel(
|
||||
optionsStr := fmt.Sprintf("name=%s,secretfile=%s", cr.ID, cr.KeyFile)
|
||||
mdsNamespace := ""
|
||||
if volOptions.FsName != "" {
|
||||
mdsNamespace = fmt.Sprintf("mds_namespace=%s", volOptions.FsName)
|
||||
mdsNamespace = "mds_namespace=" + volOptions.FsName
|
||||
}
|
||||
optionsStr = util.MountOptionsAdd(optionsStr, mdsNamespace, volOptions.KernelMountOptions, netDev)
|
||||
|
||||
|
@ -19,7 +19,7 @@ package mounter
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestFilesystemSupported(t *testing.T) {
|
||||
@ -31,8 +31,8 @@ func TestFilesystemSupported(t *testing.T) {
|
||||
|
||||
// "proc" is always a supported filesystem, we detect supported
|
||||
// filesystems by reading from it
|
||||
assert.True(t, filesystemSupported("proc"))
|
||||
require.True(t, filesystemSupported("proc"))
|
||||
|
||||
// "nonefs" is a made-up name, and does not exist
|
||||
assert.False(t, filesystemSupported("nonefs"))
|
||||
require.False(t, filesystemSupported("nonefs"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user