-
Notifications
You must be signed in to change notification settings - Fork 18
/
mocks.go
155 lines (130 loc) · 5.94 KB
/
mocks.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interfaces.go
// Package mock_formula_updater_types is a generated GoMock package.
package mock_formula_updater_types
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
formula_updater_types "github.com/solo-io/go-utils/pkgmgmtutils/formula_updater_types"
)
// MockGitClient is a mock of GitClient interface
type MockGitClient struct {
ctrl *gomock.Controller
recorder *MockGitClientMockRecorder
}
// MockGitClientMockRecorder is the mock recorder for MockGitClient
type MockGitClientMockRecorder struct {
mock *MockGitClient
}
// NewMockGitClient creates a new mock instance
func NewMockGitClient(ctrl *gomock.Controller) *MockGitClient {
mock := &MockGitClient{ctrl: ctrl}
mock.recorder = &MockGitClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockGitClient) EXPECT() *MockGitClientMockRecorder {
return m.recorder
}
// GetRefSha mocks base method
func (m *MockGitClient) GetRefSha(ctx context.Context, owner, repo, ref string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRefSha", ctx, owner, repo, ref)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRefSha indicates an expected call of GetRefSha
func (mr *MockGitClientMockRecorder) GetRefSha(ctx, owner, repo, ref interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRefSha", reflect.TypeOf((*MockGitClient)(nil).GetRefSha), ctx, owner, repo, ref)
}
// GetReleaseAssetsByTag mocks base method
func (m *MockGitClient) GetReleaseAssetsByTag(ctx context.Context, owner, repo, version string) ([]formula_updater_types.ReleaseAsset, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetReleaseAssetsByTag", ctx, owner, repo, version)
ret0, _ := ret[0].([]formula_updater_types.ReleaseAsset)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetReleaseAssetsByTag indicates an expected call of GetReleaseAssetsByTag
func (mr *MockGitClientMockRecorder) GetReleaseAssetsByTag(ctx, owner, repo, version interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReleaseAssetsByTag", reflect.TypeOf((*MockGitClient)(nil).GetReleaseAssetsByTag), ctx, owner, repo, version)
}
// CreatePullRequest mocks base method
func (m *MockGitClient) CreatePullRequest(ctx context.Context, formulaOptions *formula_updater_types.FormulaOptions, commitMessage, branchName string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreatePullRequest", ctx, formulaOptions, commitMessage, branchName)
ret0, _ := ret[0].(error)
return ret0
}
// CreatePullRequest indicates an expected call of CreatePullRequest
func (mr *MockGitClientMockRecorder) CreatePullRequest(ctx, formulaOptions, commitMessage, branchName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePullRequest", reflect.TypeOf((*MockGitClient)(nil).CreatePullRequest), ctx, formulaOptions, commitMessage, branchName)
}
// MockRemoteShaGetter is a mock of RemoteShaGetter interface
type MockRemoteShaGetter struct {
ctrl *gomock.Controller
recorder *MockRemoteShaGetterMockRecorder
}
// MockRemoteShaGetterMockRecorder is the mock recorder for MockRemoteShaGetter
type MockRemoteShaGetterMockRecorder struct {
mock *MockRemoteShaGetter
}
// NewMockRemoteShaGetter creates a new mock instance
func NewMockRemoteShaGetter(ctrl *gomock.Controller) *MockRemoteShaGetter {
mock := &MockRemoteShaGetter{ctrl: ctrl}
mock.recorder = &MockRemoteShaGetterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRemoteShaGetter) EXPECT() *MockRemoteShaGetterMockRecorder {
return m.recorder
}
// GetShaFromUrl mocks base method
func (m *MockRemoteShaGetter) GetShaFromUrl(url string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetShaFromUrl", url)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetShaFromUrl indicates an expected call of GetShaFromUrl
func (mr *MockRemoteShaGetterMockRecorder) GetShaFromUrl(url interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetShaFromUrl", reflect.TypeOf((*MockRemoteShaGetter)(nil).GetShaFromUrl), url)
}
// MockChangePusher is a mock of ChangePusher interface
type MockChangePusher struct {
ctrl *gomock.Controller
recorder *MockChangePusherMockRecorder
}
// MockChangePusherMockRecorder is the mock recorder for MockChangePusher
type MockChangePusherMockRecorder struct {
mock *MockChangePusher
}
// NewMockChangePusher creates a new mock instance
func NewMockChangePusher(ctrl *gomock.Controller) *MockChangePusher {
mock := &MockChangePusher{ctrl: ctrl}
mock.recorder = &MockChangePusherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockChangePusher) EXPECT() *MockChangePusherMockRecorder {
return m.recorder
}
// UpdateAndPush mocks base method
func (m *MockChangePusher) UpdateAndPush(ctx context.Context, version, versionSha, branchName, commitMessage string, perPlatformShas *formula_updater_types.PerPlatformSha256, formulaOptions *formula_updater_types.FormulaOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateAndPush", ctx, version, versionSha, branchName, commitMessage, perPlatformShas, formulaOptions)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateAndPush indicates an expected call of UpdateAndPush
func (mr *MockChangePusherMockRecorder) UpdateAndPush(ctx, version, versionSha, branchName, commitMessage, perPlatformShas, formulaOptions interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAndPush", reflect.TypeOf((*MockChangePusher)(nil).UpdateAndPush), ctx, version, versionSha, branchName, commitMessage, perPlatformShas, formulaOptions)
}