-
Notifications
You must be signed in to change notification settings - Fork 3
/
mocks_test.go
207 lines (176 loc) · 8.12 KB
/
mocks_test.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
// Code generated by MockGen. DO NOT EDIT.
// Source: iam_helper.go
// Package ibmcloudsecrets is a generated GoMock package.
package ibmcloudsecrets
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
logical "github.com/hashicorp/vault/sdk/logical"
)
// MockiamHelper is a mock of iamHelper interface.
type MockiamHelper struct {
ctrl *gomock.Controller
recorder *MockiamHelperMockRecorder
}
// MockiamHelperMockRecorder is the mock recorder for MockiamHelper.
type MockiamHelperMockRecorder struct {
mock *MockiamHelper
}
// NewMockiamHelper creates a new mock instance.
func NewMockiamHelper(ctrl *gomock.Controller) *MockiamHelper {
mock := &MockiamHelper{ctrl: ctrl}
mock.recorder = &MockiamHelperMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockiamHelper) EXPECT() *MockiamHelperMockRecorder {
return m.recorder
}
// AddServiceIDToAccessGroup mocks base method.
func (m *MockiamHelper) AddServiceIDToAccessGroup(iamToken, iamID, group string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddServiceIDToAccessGroup", iamToken, iamID, group)
ret0, _ := ret[0].(error)
return ret0
}
// AddServiceIDToAccessGroup indicates an expected call of AddServiceIDToAccessGroup.
func (mr *MockiamHelperMockRecorder) AddServiceIDToAccessGroup(iamToken, iamID, group interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddServiceIDToAccessGroup", reflect.TypeOf((*MockiamHelper)(nil).AddServiceIDToAccessGroup), iamToken, iamID, group)
}
// CheckServiceIDAccount mocks base method.
func (m *MockiamHelper) CheckServiceIDAccount(iamToken, identifier, accountID string) (*serviceIDv1Response, *logical.Response) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckServiceIDAccount", iamToken, identifier, accountID)
ret0, _ := ret[0].(*serviceIDv1Response)
ret1, _ := ret[1].(*logical.Response)
return ret0, ret1
}
// CheckServiceIDAccount indicates an expected call of CheckServiceIDAccount.
func (mr *MockiamHelperMockRecorder) CheckServiceIDAccount(iamToken, identifier, accountID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckServiceIDAccount", reflect.TypeOf((*MockiamHelper)(nil).CheckServiceIDAccount), iamToken, identifier, accountID)
}
// Cleanup mocks base method.
func (m *MockiamHelper) Cleanup() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Cleanup")
}
// Cleanup indicates an expected call of Cleanup.
func (mr *MockiamHelperMockRecorder) Cleanup() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cleanup", reflect.TypeOf((*MockiamHelper)(nil).Cleanup))
}
// CreateAPIKey mocks base method.
func (m *MockiamHelper) CreateAPIKey(iamToken, IAMid, accountID, name, description string) (*APIKeyV1Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateAPIKey", iamToken, IAMid, accountID, name, description)
ret0, _ := ret[0].(*APIKeyV1Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateAPIKey indicates an expected call of CreateAPIKey.
func (mr *MockiamHelperMockRecorder) CreateAPIKey(iamToken, IAMid, accountID, name, description interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAPIKey", reflect.TypeOf((*MockiamHelper)(nil).CreateAPIKey), iamToken, IAMid, accountID, name, description)
}
// CreateServiceID mocks base method.
func (m *MockiamHelper) CreateServiceID(iamToken, accountID, roleName string) (string, string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateServiceID", iamToken, accountID, roleName)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(string)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// CreateServiceID indicates an expected call of CreateServiceID.
func (mr *MockiamHelperMockRecorder) CreateServiceID(iamToken, accountID, roleName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateServiceID", reflect.TypeOf((*MockiamHelper)(nil).CreateServiceID), iamToken, accountID, roleName)
}
// DeleteAPIKey mocks base method.
func (m *MockiamHelper) DeleteAPIKey(iamToken, apiKeyID string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteAPIKey", iamToken, apiKeyID)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteAPIKey indicates an expected call of DeleteAPIKey.
func (mr *MockiamHelperMockRecorder) DeleteAPIKey(iamToken, apiKeyID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAPIKey", reflect.TypeOf((*MockiamHelper)(nil).DeleteAPIKey), iamToken, apiKeyID)
}
// DeleteServiceID mocks base method.
func (m *MockiamHelper) DeleteServiceID(iamToken, identifier string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteServiceID", iamToken, identifier)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteServiceID indicates an expected call of DeleteServiceID.
func (mr *MockiamHelperMockRecorder) DeleteServiceID(iamToken, identifier interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServiceID", reflect.TypeOf((*MockiamHelper)(nil).DeleteServiceID), iamToken, identifier)
}
// GetAPIKeyDetails mocks base method.
func (m *MockiamHelper) GetAPIKeyDetails(iamToken, apiKeyValue string) (*APIKeyDetailsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAPIKeyDetails", iamToken, apiKeyValue)
ret0, _ := ret[0].(*APIKeyDetailsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAPIKeyDetails indicates an expected call of GetAPIKeyDetails.
func (mr *MockiamHelperMockRecorder) GetAPIKeyDetails(iamToken, apiKeyValue interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIKeyDetails", reflect.TypeOf((*MockiamHelper)(nil).GetAPIKeyDetails), iamToken, apiKeyValue)
}
// Init mocks base method.
func (m *MockiamHelper) Init(iamEndpoint string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Init", iamEndpoint)
}
// Init indicates an expected call of Init.
func (mr *MockiamHelperMockRecorder) Init(iamEndpoint interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockiamHelper)(nil).Init), iamEndpoint)
}
// ObtainToken mocks base method.
func (m *MockiamHelper) ObtainToken(apiKey string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ObtainToken", apiKey)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ObtainToken indicates an expected call of ObtainToken.
func (mr *MockiamHelperMockRecorder) ObtainToken(apiKey interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObtainToken", reflect.TypeOf((*MockiamHelper)(nil).ObtainToken), apiKey)
}
// VerifyAccessGroupExists mocks base method.
func (m *MockiamHelper) VerifyAccessGroupExists(iamToken, accessGroup, accountID string) *logical.Response {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyAccessGroupExists", iamToken, accessGroup, accountID)
ret0, _ := ret[0].(*logical.Response)
return ret0
}
// VerifyAccessGroupExists indicates an expected call of VerifyAccessGroupExists.
func (mr *MockiamHelperMockRecorder) VerifyAccessGroupExists(iamToken, accessGroup, accountID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyAccessGroupExists", reflect.TypeOf((*MockiamHelper)(nil).VerifyAccessGroupExists), iamToken, accessGroup, accountID)
}
// VerifyToken mocks base method.
func (m *MockiamHelper) VerifyToken(ctx context.Context, token string) (*tokenInfo, *logical.Response) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyToken", ctx, token)
ret0, _ := ret[0].(*tokenInfo)
ret1, _ := ret[1].(*logical.Response)
return ret0, ret1
}
// VerifyToken indicates an expected call of VerifyToken.
func (mr *MockiamHelperMockRecorder) VerifyToken(ctx, token interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyToken", reflect.TypeOf((*MockiamHelper)(nil).VerifyToken), ctx, token)
}