Files
zeekayandHanzo Dev 1ab6e799c1 cd: the module is github.com/hanzoai/cd, where it is actually hosted
go.mod still declared `module github.com/hanzoai/deploy` after the repo was
renamed. A Go module path is not cosmetic — it is the resolvable location. So
`go get github.com/hanzoai/cd` could not work, and anything importing this
module had to spell a name that no longer exists at that address. The build log
of v3.6.0 is where it surfaced: the compiler was still emitting
github.com/hanzoai/deploy/cmd/cd/commands.

3541 import paths across 690 .go, 19 .proto, 4 .yaml, 3 .sh, 2 .mod, Procfile
and Makefile. Plus the 62 ghcr.io/hanzoai/deploy image references, moved to
ghcr.io/hanzoai/cd to match hanzo.yml's build target — a distinct string from
the module path, replaced separately so neither could clobber the other.

go mod tidy clean, CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./... clean.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 21:16:24 -07:00

397 lines
11 KiB
Go
Generated

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"context"
"github.com/hanzoai/cd/util/helm"
"github.com/hanzoai/cd/util/io"
mock "github.com/stretchr/testify/mock"
)
// 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
}
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
type Client_Expecter struct {
mock *mock.Mock
}
func (_m *Client) EXPECT() *Client_Expecter {
return &Client_Expecter{mock: &_m.Mock}
}
// CleanChartCache provides a mock function for the type Client
func (_mock *Client) CleanChartCache(chart string, version string) error {
ret := _mock.Called(chart, version)
if len(ret) == 0 {
panic("no return value specified for CleanChartCache")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string) error); ok {
r0 = returnFunc(chart, version)
} else {
r0 = ret.Error(0)
}
return r0
}
// Client_CleanChartCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanChartCache'
type Client_CleanChartCache_Call struct {
*mock.Call
}
// CleanChartCache is a helper method to define mock.On call
// - chart string
// - version string
func (_e *Client_Expecter) CleanChartCache(chart any, version any) *Client_CleanChartCache_Call {
return &Client_CleanChartCache_Call{Call: _e.mock.On("CleanChartCache", chart, version)}
}
func (_c *Client_CleanChartCache_Call) Run(run func(chart string, version string)) *Client_CleanChartCache_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *Client_CleanChartCache_Call) Return(err error) *Client_CleanChartCache_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_CleanChartCache_Call) RunAndReturn(run func(chart string, version string) error) *Client_CleanChartCache_Call {
_c.Call.Return(run)
return _c
}
// ExtractChart provides a mock function for the type Client
func (_mock *Client) ExtractChart(ctx context.Context, chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error) {
ret := _mock.Called(ctx, 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 returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool, int64, bool) (string, io.Closer, error)); ok {
return returnFunc(ctx, chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool, int64, bool) string); ok {
r0 = returnFunc(ctx, chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
} else {
r0 = ret.Get(0).(string)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, bool, int64, bool) io.Closer); ok {
r1 = returnFunc(ctx, chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(io.Closer)
}
}
if returnFunc, ok := ret.Get(2).(func(context.Context, string, string, bool, int64, bool) error); ok {
r2 = returnFunc(ctx, chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// Client_ExtractChart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtractChart'
type Client_ExtractChart_Call struct {
*mock.Call
}
// ExtractChart is a helper method to define mock.On call
// - ctx context.Context
// - chart string
// - version string
// - passCredentials bool
// - manifestMaxExtractedSize int64
// - disableManifestMaxExtractedSize bool
func (_e *Client_Expecter) ExtractChart(ctx any, chart any, version any, passCredentials any, manifestMaxExtractedSize any, disableManifestMaxExtractedSize any) *Client_ExtractChart_Call {
return &Client_ExtractChart_Call{Call: _e.mock.On("ExtractChart", ctx, chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)}
}
func (_c *Client_ExtractChart_Call) Run(run func(ctx context.Context, chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool)) *Client_ExtractChart_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 bool
if args[3] != nil {
arg3 = args[3].(bool)
}
var arg4 int64
if args[4] != nil {
arg4 = args[4].(int64)
}
var arg5 bool
if args[5] != nil {
arg5 = args[5].(bool)
}
run(
arg0,
arg1,
arg2,
arg3,
arg4,
arg5,
)
})
return _c
}
func (_c *Client_ExtractChart_Call) Return(s string, closer io.Closer, err error) *Client_ExtractChart_Call {
_c.Call.Return(s, closer, err)
return _c
}
func (_c *Client_ExtractChart_Call) RunAndReturn(run func(ctx context.Context, chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error)) *Client_ExtractChart_Call {
_c.Call.Return(run)
return _c
}
// GetIndex provides a mock function for the type Client
func (_mock *Client) GetIndex(ctx context.Context, noCache bool, maxIndexSize int64) (*helm.Index, error) {
ret := _mock.Called(ctx, noCache, maxIndexSize)
if len(ret) == 0 {
panic("no return value specified for GetIndex")
}
var r0 *helm.Index
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, bool, int64) (*helm.Index, error)); ok {
return returnFunc(ctx, noCache, maxIndexSize)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, bool, int64) *helm.Index); ok {
r0 = returnFunc(ctx, noCache, maxIndexSize)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*helm.Index)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, bool, int64) error); ok {
r1 = returnFunc(ctx, noCache, maxIndexSize)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_GetIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndex'
type Client_GetIndex_Call struct {
*mock.Call
}
// GetIndex is a helper method to define mock.On call
// - ctx context.Context
// - noCache bool
// - maxIndexSize int64
func (_e *Client_Expecter) GetIndex(ctx any, noCache any, maxIndexSize any) *Client_GetIndex_Call {
return &Client_GetIndex_Call{Call: _e.mock.On("GetIndex", ctx, noCache, maxIndexSize)}
}
func (_c *Client_GetIndex_Call) Run(run func(ctx context.Context, noCache bool, maxIndexSize int64)) *Client_GetIndex_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 bool
if args[1] != nil {
arg1 = args[1].(bool)
}
var arg2 int64
if args[2] != nil {
arg2 = args[2].(int64)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Client_GetIndex_Call) Return(index *helm.Index, err error) *Client_GetIndex_Call {
_c.Call.Return(index, err)
return _c
}
func (_c *Client_GetIndex_Call) RunAndReturn(run func(ctx context.Context, noCache bool, maxIndexSize int64) (*helm.Index, error)) *Client_GetIndex_Call {
_c.Call.Return(run)
return _c
}
// GetTags provides a mock function for the type Client
func (_mock *Client) GetTags(ctx context.Context, chart string, noCache bool) ([]string, error) {
ret := _mock.Called(ctx, chart, noCache)
if len(ret) == 0 {
panic("no return value specified for GetTags")
}
var r0 []string
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) ([]string, error)); ok {
return returnFunc(ctx, chart, noCache)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) []string); ok {
r0 = returnFunc(ctx, chart, noCache)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
r1 = returnFunc(ctx, chart, noCache)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_GetTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTags'
type Client_GetTags_Call struct {
*mock.Call
}
// GetTags is a helper method to define mock.On call
// - ctx context.Context
// - chart string
// - noCache bool
func (_e *Client_Expecter) GetTags(ctx any, chart any, noCache any) *Client_GetTags_Call {
return &Client_GetTags_Call{Call: _e.mock.On("GetTags", ctx, chart, noCache)}
}
func (_c *Client_GetTags_Call) Run(run func(ctx context.Context, chart string, noCache bool)) *Client_GetTags_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 bool
if args[2] != nil {
arg2 = args[2].(bool)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Client_GetTags_Call) Return(strings []string, err error) *Client_GetTags_Call {
_c.Call.Return(strings, err)
return _c
}
func (_c *Client_GetTags_Call) RunAndReturn(run func(ctx context.Context, chart string, noCache bool) ([]string, error)) *Client_GetTags_Call {
_c.Call.Return(run)
return _c
}
// TestHelmOCI provides a mock function for the type Client
func (_mock *Client) TestHelmOCI() (bool, error) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for TestHelmOCI")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() bool); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func() error); ok {
r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_TestHelmOCI_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestHelmOCI'
type Client_TestHelmOCI_Call struct {
*mock.Call
}
// TestHelmOCI is a helper method to define mock.On call
func (_e *Client_Expecter) TestHelmOCI() *Client_TestHelmOCI_Call {
return &Client_TestHelmOCI_Call{Call: _e.mock.On("TestHelmOCI")}
}
func (_c *Client_TestHelmOCI_Call) Run(run func()) *Client_TestHelmOCI_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Client_TestHelmOCI_Call) Return(b bool, err error) *Client_TestHelmOCI_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *Client_TestHelmOCI_Call) RunAndReturn(run func() (bool, error)) *Client_TestHelmOCI_Call {
_c.Call.Return(run)
return _c
}