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

     1  // Code generated by mockery v2.25.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // Repos is an autogenerated mock type for the Repos type
    12  type Repos struct {
    13  	mock.Mock
    14  }
    15  
    16  // GetDirectories provides a mock function with given fields: ctx, repoURL, revision, noRevisionCache
    17  func (_m *Repos) GetDirectories(ctx context.Context, repoURL string, revision string, noRevisionCache bool) ([]string, error) {
    18  	ret := _m.Called(ctx, repoURL, revision, noRevisionCache)
    19  
    20  	var r0 []string
    21  	var r1 error
    22  	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) ([]string, error)); ok {
    23  		return rf(ctx, repoURL, revision, noRevisionCache)
    24  	}
    25  	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) []string); ok {
    26  		r0 = rf(ctx, repoURL, revision, noRevisionCache)
    27  	} else {
    28  		if ret.Get(0) != nil {
    29  			r0 = ret.Get(0).([]string)
    30  		}
    31  	}
    32  
    33  	if rf, ok := ret.Get(1).(func(context.Context, string, string, bool) error); ok {
    34  		r1 = rf(ctx, repoURL, revision, noRevisionCache)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  // GetFiles provides a mock function with given fields: ctx, repoURL, revision, pattern, noRevisionCache
    43  func (_m *Repos) GetFiles(ctx context.Context, repoURL string, revision string, pattern string, noRevisionCache bool) (map[string][]byte, error) {
    44  	ret := _m.Called(ctx, repoURL, revision, pattern, noRevisionCache)
    45  
    46  	var r0 map[string][]byte
    47  	var r1 error
    48  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, bool) (map[string][]byte, error)); ok {
    49  		return rf(ctx, repoURL, revision, pattern, noRevisionCache)
    50  	}
    51  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, bool) map[string][]byte); ok {
    52  		r0 = rf(ctx, repoURL, revision, pattern, noRevisionCache)
    53  	} else {
    54  		if ret.Get(0) != nil {
    55  			r0 = ret.Get(0).(map[string][]byte)
    56  		}
    57  	}
    58  
    59  	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, bool) error); ok {
    60  		r1 = rf(ctx, repoURL, revision, pattern, noRevisionCache)
    61  	} else {
    62  		r1 = ret.Error(1)
    63  	}
    64  
    65  	return r0, r1
    66  }
    67  
    68  type mockConstructorTestingTNewRepos interface {
    69  	mock.TestingT
    70  	Cleanup(func())
    71  }
    72  
    73  // NewRepos creates a new instance of Repos. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    74  func NewRepos(t mockConstructorTestingTNewRepos) *Repos {
    75  	mock := &Repos{}
    76  	mock.Mock.Test(t)
    77  
    78  	t.Cleanup(func() { mock.AssertExpectations(t) })
    79  
    80  	return mock
    81  }