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]>
108 lines
3.2 KiB
Go
Generated
108 lines
3.2 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"
|
|
)
|
|
|
|
// NewRepoCredsDB creates a new instance of RepoCredsDB. 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 NewRepoCredsDB(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *RepoCredsDB {
|
|
mock := &RepoCredsDB{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// RepoCredsDB is an autogenerated mock type for the RepoCredsDB type
|
|
type RepoCredsDB struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type RepoCredsDB_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *RepoCredsDB) EXPECT() *RepoCredsDB_Expecter {
|
|
return &RepoCredsDB_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetRepoCredsBySecretName provides a mock function for the type RepoCredsDB
|
|
func (_mock *RepoCredsDB) GetRepoCredsBySecretName(context1 context.Context, secretName string) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(context1, secretName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRepoCredsBySecretName")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(context1, secretName)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(context1, secretName)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(context1, secretName)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// RepoCredsDB_GetRepoCredsBySecretName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepoCredsBySecretName'
|
|
type RepoCredsDB_GetRepoCredsBySecretName_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRepoCredsBySecretName is a helper method to define mock.On call
|
|
// - context1 context.Context
|
|
// - secretName string
|
|
func (_e *RepoCredsDB_Expecter) GetRepoCredsBySecretName(context1 any, secretName any) *RepoCredsDB_GetRepoCredsBySecretName_Call {
|
|
return &RepoCredsDB_GetRepoCredsBySecretName_Call{Call: _e.mock.On("GetRepoCredsBySecretName", context1, secretName)}
|
|
}
|
|
|
|
func (_c *RepoCredsDB_GetRepoCredsBySecretName_Call) Run(run func(context1 context.Context, secretName string)) *RepoCredsDB_GetRepoCredsBySecretName_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 *RepoCredsDB_GetRepoCredsBySecretName_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *RepoCredsDB_GetRepoCredsBySecretName_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *RepoCredsDB_GetRepoCredsBySecretName_Call) RunAndReturn(run func(context1 context.Context, secretName string) (*v1alpha1.RepoCreds, error)) *RepoCredsDB_GetRepoCredsBySecretName_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|