mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
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]>
170 lines
4.5 KiB
Go
Generated
170 lines
4.5 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzoai/cd/pkg/apis/application/v1alpha1"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewProjectGetter creates a new instance of ProjectGetter. 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 NewProjectGetter(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *ProjectGetter {
|
|
mock := &ProjectGetter{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// ProjectGetter is an autogenerated mock type for the ProjectGetter type
|
|
type ProjectGetter struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type ProjectGetter_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *ProjectGetter) EXPECT() *ProjectGetter_Expecter {
|
|
return &ProjectGetter_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Get provides a mock function for the type ProjectGetter
|
|
func (_mock *ProjectGetter) Get(name string) (*v1alpha1.AppProject, error) {
|
|
ret := _mock.Called(name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 *v1alpha1.AppProject
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) (*v1alpha1.AppProject, error)); ok {
|
|
return returnFunc(name)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(string) *v1alpha1.AppProject); ok {
|
|
r0 = returnFunc(name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.AppProject)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = returnFunc(name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// ProjectGetter_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
|
|
type ProjectGetter_Get_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Get is a helper method to define mock.On call
|
|
// - name string
|
|
func (_e *ProjectGetter_Expecter) Get(name any) *ProjectGetter_Get_Call {
|
|
return &ProjectGetter_Get_Call{Call: _e.mock.On("Get", name)}
|
|
}
|
|
|
|
func (_c *ProjectGetter_Get_Call) Run(run func(name string)) *ProjectGetter_Get_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ProjectGetter_Get_Call) Return(appProject *v1alpha1.AppProject, err error) *ProjectGetter_Get_Call {
|
|
_c.Call.Return(appProject, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ProjectGetter_Get_Call) RunAndReturn(run func(name string) (*v1alpha1.AppProject, error)) *ProjectGetter_Get_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetClusters provides a mock function for the type ProjectGetter
|
|
func (_mock *ProjectGetter) GetClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error) {
|
|
ret := _mock.Called(ctx, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetClusters")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Cluster
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*v1alpha1.Cluster, error)); ok {
|
|
return returnFunc(ctx, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*v1alpha1.Cluster); ok {
|
|
r0 = returnFunc(ctx, project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Cluster)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// ProjectGetter_GetClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusters'
|
|
type ProjectGetter_GetClusters_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetClusters is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - project string
|
|
func (_e *ProjectGetter_Expecter) GetClusters(ctx any, project any) *ProjectGetter_GetClusters_Call {
|
|
return &ProjectGetter_GetClusters_Call{Call: _e.mock.On("GetClusters", ctx, project)}
|
|
}
|
|
|
|
func (_c *ProjectGetter_GetClusters_Call) Run(run func(ctx context.Context, project string)) *ProjectGetter_GetClusters_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)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ProjectGetter_GetClusters_Call) Return(clusters []*v1alpha1.Cluster, err error) *ProjectGetter_GetClusters_Call {
|
|
_c.Call.Return(clusters, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ProjectGetter_GetClusters_Call) RunAndReturn(run func(ctx context.Context, project string) ([]*v1alpha1.Cluster, error)) *ProjectGetter_GetClusters_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|