github.com/whamcloud/lemur@v0.0.0-20190827193804-4655df8a52af/pkg/fsroot/testing.go (about) 1 // Copyright (c) 2018 DDN. All rights reserved. 2 // Use of this source code is governed by a MIT-style 3 // license that can be found in the LICENSE file. 4 5 package fsroot 6 7 import "github.com/intel-hpdd/go-lustre/fs" 8 9 // TestClient implements the client.Client interface 10 type testClient struct { 11 root string 12 } 13 14 // Test returns a test client. 15 func Test(root string) Client { 16 return &testClient{root: root} 17 } 18 19 // FsName returns a fake filesystem name 20 func (c *testClient) FsName() string { 21 return "test" 22 } 23 24 // Path returns a fake filesystem path 25 func (c *testClient) Path() string { 26 return c.root 27 } 28 29 // Root returns a fake fs.RootDir item 30 func (c *testClient) Root() fs.RootDir { 31 // Todo need a TestRootDir 32 return fs.RootDir{} 33 }