-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathmetrics_mock.go
190 lines (147 loc) · 4.48 KB
/
metrics_mock.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// Code generated by mockery. DO NOT EDIT.
package dao
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockMetricsDao is an autogenerated mock type for the MetricsDao type
type MockMetricsDao struct {
mock.Mock
}
// OrganizationTotal provides a mock function with given fields: ctx
func (_m *MockMetricsDao) OrganizationTotal(ctx context.Context) int64 {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for OrganizationTotal")
}
var r0 int64
if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int64)
}
return r0
}
// PendingTasksAverageLatency provides a mock function with given fields: ctx
func (_m *MockMetricsDao) PendingTasksAverageLatency(ctx context.Context) float64 {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for PendingTasksAverageLatency")
}
var r0 float64
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(float64)
}
return r0
}
// PendingTasksCount provides a mock function with given fields: ctx
func (_m *MockMetricsDao) PendingTasksCount(ctx context.Context) int64 {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for PendingTasksCount")
}
var r0 int64
if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int64)
}
return r0
}
// PendingTasksOldestTask provides a mock function with given fields: ctx
func (_m *MockMetricsDao) PendingTasksOldestTask(ctx context.Context) float64 {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for PendingTasksOldestTask")
}
var r0 float64
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(float64)
}
return r0
}
// PublicRepositoriesFailedIntrospectionCount provides a mock function with given fields: ctx
func (_m *MockMetricsDao) PublicRepositoriesFailedIntrospectionCount(ctx context.Context) int {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for PublicRepositoriesFailedIntrospectionCount")
}
var r0 int
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int)
}
return r0
}
// RHReposSnapshotNotCompletedInLast36HoursCount provides a mock function with given fields: ctx
func (_m *MockMetricsDao) RHReposSnapshotNotCompletedInLast36HoursCount(ctx context.Context) int64 {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for RHReposSnapshotNotCompletedInLast36HoursCount")
}
var r0 int64
if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int64)
}
return r0
}
// RepositoriesCount provides a mock function with given fields: ctx
func (_m *MockMetricsDao) RepositoriesCount(ctx context.Context) int {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for RepositoriesCount")
}
var r0 int
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int)
}
return r0
}
// RepositoriesIntrospectionCount provides a mock function with given fields: ctx, hours, public
func (_m *MockMetricsDao) RepositoriesIntrospectionCount(ctx context.Context, hours int, public bool) IntrospectionCount {
ret := _m.Called(ctx, hours, public)
if len(ret) == 0 {
panic("no return value specified for RepositoriesIntrospectionCount")
}
var r0 IntrospectionCount
if rf, ok := ret.Get(0).(func(context.Context, int, bool) IntrospectionCount); ok {
r0 = rf(ctx, hours, public)
} else {
r0 = ret.Get(0).(IntrospectionCount)
}
return r0
}
// RepositoryConfigsCount provides a mock function with given fields: ctx
func (_m *MockMetricsDao) RepositoryConfigsCount(ctx context.Context) int {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for RepositoryConfigsCount")
}
var r0 int
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(int)
}
return r0
}
// NewMockMetricsDao creates a new instance of MockMetricsDao. 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 NewMockMetricsDao(t interface {
mock.TestingT
Cleanup(func())
}) *MockMetricsDao {
mock := &MockMetricsDao{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}