(ctx context.Context, share string)
| 29 | } |
| 30 | |
| 31 | func (m *mockFs) getConnection(ctx context.Context, share string) (*conn, error) { |
| 32 | m.mu.Lock() |
| 33 | defer m.mu.Unlock() |
| 34 | m.getConnectionCalled = true |
| 35 | if m.getConnectionErr != nil { |
| 36 | return nil, m.getConnectionErr |
| 37 | } |
| 38 | if m.getConnectionResult != nil { |
| 39 | return m.getConnectionResult, nil |
| 40 | } |
| 41 | return &conn{}, nil |
| 42 | } |
| 43 | |
| 44 | func (m *mockFs) removeSession() { |
| 45 | m.mu.Lock() |