-
Notifications
You must be signed in to change notification settings - Fork 38
/
SFTPClient.go
95 lines (77 loc) · 2.01 KB
/
SFTPClient.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Code generated by mockery. DO NOT EDIT.
package mocks
import (
fs "io/fs"
mock "github.com/stretchr/testify/mock"
services "github.com/transcom/mymove/pkg/services"
)
// SFTPClient is an autogenerated mock type for the SFTPClient type
type SFTPClient struct {
mock.Mock
}
// Open provides a mock function with given fields: path
func (_m *SFTPClient) Open(path string) (services.SFTPFiler, error) {
ret := _m.Called(path)
var r0 services.SFTPFiler
var r1 error
if rf, ok := ret.Get(0).(func(string) (services.SFTPFiler, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) services.SFTPFiler); ok {
r0 = rf(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(services.SFTPFiler)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ReadDir provides a mock function with given fields: p
func (_m *SFTPClient) ReadDir(p string) ([]fs.FileInfo, error) {
ret := _m.Called(p)
var r0 []fs.FileInfo
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]fs.FileInfo, error)); ok {
return rf(p)
}
if rf, ok := ret.Get(0).(func(string) []fs.FileInfo); ok {
r0 = rf(p)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]fs.FileInfo)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(p)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Remove provides a mock function with given fields: path
func (_m *SFTPClient) Remove(path string) error {
ret := _m.Called(path)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(path)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewSFTPClient creates a new instance of SFTPClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewSFTPClient(t interface {
mock.TestingT
Cleanup(func())
}) *SFTPClient {
mock := &SFTPClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}