-
Notifications
You must be signed in to change notification settings - Fork 1
/
mock_Network.go
166 lines (131 loc) · 4.75 KB
/
mock_Network.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Code generated by mockery v1.0.0
// This comment works around https://github.com/vektra/mockery/issues/155
package common
import io "io"
import mock "github.com/stretchr/testify/mock"
// MockNetwork is an autogenerated mock type for the Network type
type MockNetwork struct {
mock.Mock
}
// DownloadArtifacts provides a mock function with given fields: config, artifactsFile
func (_m *MockNetwork) DownloadArtifacts(config JobCredentials, artifactsFile string) DownloadState {
ret := _m.Called(config, artifactsFile)
var r0 DownloadState
if rf, ok := ret.Get(0).(func(JobCredentials, string) DownloadState); ok {
r0 = rf(config, artifactsFile)
} else {
r0 = ret.Get(0).(DownloadState)
}
return r0
}
// PatchTrace provides a mock function with given fields: config, jobCredentials, tracePart
func (_m *MockNetwork) PatchTrace(config RunnerConfig, jobCredentials *JobCredentials, tracePart JobTracePatch) UpdateState {
ret := _m.Called(config, jobCredentials, tracePart)
var r0 UpdateState
if rf, ok := ret.Get(0).(func(RunnerConfig, *JobCredentials, JobTracePatch) UpdateState); ok {
r0 = rf(config, jobCredentials, tracePart)
} else {
r0 = ret.Get(0).(UpdateState)
}
return r0
}
// ProcessJob provides a mock function with given fields: config, buildCredentials
func (_m *MockNetwork) ProcessJob(config RunnerConfig, buildCredentials *JobCredentials) JobTrace {
ret := _m.Called(config, buildCredentials)
var r0 JobTrace
if rf, ok := ret.Get(0).(func(RunnerConfig, *JobCredentials) JobTrace); ok {
r0 = rf(config, buildCredentials)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(JobTrace)
}
}
return r0
}
// RegisterRunner provides a mock function with given fields: config, description, tags, runUntagged, locked
func (_m *MockNetwork) RegisterRunner(config RunnerCredentials, description string, tags string, runUntagged bool, locked bool) *RegisterRunnerResponse {
ret := _m.Called(config, description, tags, runUntagged, locked)
var r0 *RegisterRunnerResponse
if rf, ok := ret.Get(0).(func(RunnerCredentials, string, string, bool, bool) *RegisterRunnerResponse); ok {
r0 = rf(config, description, tags, runUntagged, locked)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*RegisterRunnerResponse)
}
}
return r0
}
// RequestJob provides a mock function with given fields: config
func (_m *MockNetwork) RequestJob(config RunnerConfig) (*JobResponse, bool) {
ret := _m.Called(config)
var r0 *JobResponse
if rf, ok := ret.Get(0).(func(RunnerConfig) *JobResponse); ok {
r0 = rf(config)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*JobResponse)
}
}
var r1 bool
if rf, ok := ret.Get(1).(func(RunnerConfig) bool); ok {
r1 = rf(config)
} else {
r1 = ret.Get(1).(bool)
}
return r0, r1
}
// UnregisterRunner provides a mock function with given fields: config
func (_m *MockNetwork) UnregisterRunner(config RunnerCredentials) bool {
ret := _m.Called(config)
var r0 bool
if rf, ok := ret.Get(0).(func(RunnerCredentials) bool); ok {
r0 = rf(config)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// UpdateJob provides a mock function with given fields: config, jobCredentials, id, state, trace
func (_m *MockNetwork) UpdateJob(config RunnerConfig, jobCredentials *JobCredentials, id int, state JobState, trace *string) UpdateState {
ret := _m.Called(config, jobCredentials, id, state, trace)
var r0 UpdateState
if rf, ok := ret.Get(0).(func(RunnerConfig, *JobCredentials, int, JobState, *string) UpdateState); ok {
r0 = rf(config, jobCredentials, id, state, trace)
} else {
r0 = ret.Get(0).(UpdateState)
}
return r0
}
// UploadArtifacts provides a mock function with given fields: config, artifactsFile
func (_m *MockNetwork) UploadArtifacts(config JobCredentials, artifactsFile string) UploadState {
ret := _m.Called(config, artifactsFile)
var r0 UploadState
if rf, ok := ret.Get(0).(func(JobCredentials, string) UploadState); ok {
r0 = rf(config, artifactsFile)
} else {
r0 = ret.Get(0).(UploadState)
}
return r0
}
// UploadRawArtifacts provides a mock function with given fields: config, reader, baseName, expireIn
func (_m *MockNetwork) UploadRawArtifacts(config JobCredentials, reader io.Reader, baseName string, expireIn string) UploadState {
ret := _m.Called(config, reader, baseName, expireIn)
var r0 UploadState
if rf, ok := ret.Get(0).(func(JobCredentials, io.Reader, string, string) UploadState); ok {
r0 = rf(config, reader, baseName, expireIn)
} else {
r0 = ret.Get(0).(UploadState)
}
return r0
}
// VerifyRunner provides a mock function with given fields: config
func (_m *MockNetwork) VerifyRunner(config RunnerCredentials) bool {
ret := _m.Called(config)
var r0 bool
if rf, ok := ret.Get(0).(func(RunnerCredentials) bool); ok {
r0 = rf(config)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}