github.com/helmwave/helmwave@v0.36.4-0.20240509190856-b35563eba4c6/pkg/plan/mock_repository_export_test.go (about) 1 package plan 2 3 import ( 4 "context" 5 6 "github.com/helmwave/helmwave/pkg/repo" 7 "github.com/sirupsen/logrus" 8 "github.com/stretchr/testify/mock" 9 "helm.sh/helm/v3/pkg/cli" 10 repo2 "helm.sh/helm/v3/pkg/repo" 11 ) 12 13 type MockRepositoryConfig struct { 14 mock.Mock 15 } 16 17 func (r *MockRepositoryConfig) Equal(_ repo.Config) bool { 18 return r.Called().Bool(0) 19 } 20 21 func (r *MockRepositoryConfig) Install(context.Context, *cli.EnvSettings, *repo2.File) error { 22 return r.Called().Error(0) 23 } 24 25 func (r *MockRepositoryConfig) Name() string { 26 return r.Called().String(0) 27 } 28 29 func (r *MockRepositoryConfig) URL() string { 30 return r.Called().String(0) 31 } 32 33 func (r *MockRepositoryConfig) Logger() *logrus.Entry { 34 return r.Called().Get(0).(*logrus.Entry) 35 } 36 37 func (r *MockRepositoryConfig) Validate() error { 38 return r.Called().Error(0) 39 }