forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.go
More file actions
172 lines (140 loc) · 4.46 KB
/
Client.go
File metadata and controls
172 lines (140 loc) · 4.46 KB
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
// Code generated by mockery v2.43.2. DO NOT EDIT.
package mocks
import (
helm "github.com/argoproj/argo-cd/v2/util/helm"
io "github.com/argoproj/argo-cd/v2/util/io"
mock "github.com/stretchr/testify/mock"
)
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
// CleanChartCache provides a mock function with given fields: chart, version
func (_m *Client) CleanChartCache(chart string, version string) error {
ret := _m.Called(chart, version)
if len(ret) == 0 {
panic("no return value specified for CleanChartCache")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(chart, version)
} else {
r0 = ret.Error(0)
}
return r0
}
// ExtractChart provides a mock function with given fields: chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize
func (_m *Client) ExtractChart(chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error) {
ret := _m.Called(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
if len(ret) == 0 {
panic("no return value specified for ExtractChart")
}
var r0 string
var r1 io.Closer
var r2 error
if rf, ok := ret.Get(0).(func(string, string, bool, int64, bool) (string, io.Closer, error)); ok {
return rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
}
if rf, ok := ret.Get(0).(func(string, string, bool, int64, bool) string); ok {
r0 = rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string, string, bool, int64, bool) io.Closer); ok {
r1 = rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(io.Closer)
}
}
if rf, ok := ret.Get(2).(func(string, string, bool, int64, bool) error); ok {
r2 = rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// GetIndex provides a mock function with given fields: noCache, maxIndexSize
func (_m *Client) GetIndex(noCache bool, maxIndexSize int64) (*helm.Index, error) {
ret := _m.Called(noCache, maxIndexSize)
if len(ret) == 0 {
panic("no return value specified for GetIndex")
}
var r0 *helm.Index
var r1 error
if rf, ok := ret.Get(0).(func(bool, int64) (*helm.Index, error)); ok {
return rf(noCache, maxIndexSize)
}
if rf, ok := ret.Get(0).(func(bool, int64) *helm.Index); ok {
r0 = rf(noCache, maxIndexSize)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*helm.Index)
}
}
if rf, ok := ret.Get(1).(func(bool, int64) error); ok {
r1 = rf(noCache, maxIndexSize)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTags provides a mock function with given fields: chart, noCache
func (_m *Client) GetTags(chart string, noCache bool) (*helm.TagsList, error) {
ret := _m.Called(chart, noCache)
if len(ret) == 0 {
panic("no return value specified for GetTags")
}
var r0 *helm.TagsList
var r1 error
if rf, ok := ret.Get(0).(func(string, bool) (*helm.TagsList, error)); ok {
return rf(chart, noCache)
}
if rf, ok := ret.Get(0).(func(string, bool) *helm.TagsList); ok {
r0 = rf(chart, noCache)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*helm.TagsList)
}
}
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
r1 = rf(chart, noCache)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// TestHelmOCI provides a mock function with given fields:
func (_m *Client) TestHelmOCI() (bool, error) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for TestHelmOCI")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func() (bool, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewClient creates a new instance of Client. 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 NewClient(t interface {
mock.TestingT
Cleanup(func())
}) *Client {
mock := &Client{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}