github.com/argoproj/argo-cd/v2@v2.10.9/applicationset/services/mocks/RepositoryDB.go (about)

     1  // Code generated by mockery v2.21.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
    11  )
    12  
    13  // RepositoryDB is an autogenerated mock type for the RepositoryDB type
    14  type RepositoryDB struct {
    15  	mock.Mock
    16  }
    17  
    18  // GetRepository provides a mock function with given fields: ctx, url
    19  func (_m *RepositoryDB) GetRepository(ctx context.Context, url string) (*v1alpha1.Repository, error) {
    20  	ret := _m.Called(ctx, url)
    21  
    22  	var r0 *v1alpha1.Repository
    23  	var r1 error
    24  	if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.Repository, error)); ok {
    25  		return rf(ctx, url)
    26  	}
    27  	if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.Repository); ok {
    28  		r0 = rf(ctx, url)
    29  	} else {
    30  		if ret.Get(0) != nil {
    31  			r0 = ret.Get(0).(*v1alpha1.Repository)
    32  		}
    33  	}
    34  
    35  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    36  		r1 = rf(ctx, url)
    37  	} else {
    38  		r1 = ret.Error(1)
    39  	}
    40  
    41  	return r0, r1
    42  }
    43  
    44  type mockConstructorTestingTNewRepositoryDB interface {
    45  	mock.TestingT
    46  	Cleanup(func())
    47  }
    48  
    49  // NewRepositoryDB creates a new instance of RepositoryDB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    50  func NewRepositoryDB(t mockConstructorTestingTNewRepositoryDB) *RepositoryDB {
    51  	mock := &RepositoryDB{}
    52  	mock.Mock.Test(t)
    53  
    54  	t.Cleanup(func() { mock.AssertExpectations(t) })
    55  
    56  	return mock
    57  }