-
Notifications
You must be signed in to change notification settings - Fork 2
/
mocks_test.go
176 lines (149 loc) · 6.73 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
// Code generated by MockGen. DO NOT EDIT.
// Source: iam_helper.go
// Package ibmcloudauth is a generated GoMock package.
package ibmcloudauth
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
}
// CheckGroupMembership mocks base method.
func (m *MockiamHelper) CheckGroupMembership(groupID, iamID, iamToken string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckGroupMembership", groupID, iamID, iamToken)
ret0, _ := ret[0].(error)
return ret0
}
// CheckGroupMembership indicates an expected call of CheckGroupMembership.
func (mr *MockiamHelperMockRecorder) CheckGroupMembership(groupID, iamID, iamToken interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckGroupMembership", reflect.TypeOf((*MockiamHelper)(nil).CheckGroupMembership), groupID, iamID, iamToken)
}
// CheckServiceIDAccount mocks base method.
func (m *MockiamHelper) CheckServiceIDAccount(iamToken, identifier, accountID string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckServiceIDAccount", iamToken, identifier, accountID)
ret0, _ := ret[0].(error)
return ret0
}
// 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)
}
// CheckUserIDAccount mocks base method.
func (m *MockiamHelper) CheckUserIDAccount(iamToken, iamID, accountID string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckUserIDAccount", iamToken, iamID, accountID)
ret0, _ := ret[0].(error)
return ret0
}
// CheckUserIDAccount indicates an expected call of CheckUserIDAccount.
func (mr *MockiamHelperMockRecorder) CheckUserIDAccount(iamToken, iamID, accountID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckUserIDAccount", reflect.TypeOf((*MockiamHelper)(nil).CheckUserIDAccount), iamToken, iamID, 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)
}
// 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)
}
// 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, userManagementEndpoint string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Init", iamEndpoint, userManagementEndpoint)
}
// Init indicates an expected call of Init.
func (mr *MockiamHelperMockRecorder) Init(iamEndpoint, userManagementEndpoint interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockiamHelper)(nil).Init), iamEndpoint, userManagementEndpoint)
}
// 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)
}
// 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)
}