github.com/grafana/pyroscope@v1.18.0/pkg/test/mocks/mocksymbolizer/mock_debuginfod_client.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocksymbolizer
     4  
     5  import (
     6  	context "context"
     7  	io "io"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // MockDebuginfodClient is an autogenerated mock type for the DebuginfodClient type
    13  type MockDebuginfodClient struct {
    14  	mock.Mock
    15  }
    16  
    17  type MockDebuginfodClient_Expecter struct {
    18  	mock *mock.Mock
    19  }
    20  
    21  func (_m *MockDebuginfodClient) EXPECT() *MockDebuginfodClient_Expecter {
    22  	return &MockDebuginfodClient_Expecter{mock: &_m.Mock}
    23  }
    24  
    25  // FetchDebuginfo provides a mock function with given fields: ctx, buildID
    26  func (_m *MockDebuginfodClient) FetchDebuginfo(ctx context.Context, buildID string) (io.ReadCloser, error) {
    27  	ret := _m.Called(ctx, buildID)
    28  
    29  	if len(ret) == 0 {
    30  		panic("no return value specified for FetchDebuginfo")
    31  	}
    32  
    33  	var r0 io.ReadCloser
    34  	var r1 error
    35  	if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok {
    36  		return rf(ctx, buildID)
    37  	}
    38  	if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok {
    39  		r0 = rf(ctx, buildID)
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(io.ReadCloser)
    43  		}
    44  	}
    45  
    46  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    47  		r1 = rf(ctx, buildID)
    48  	} else {
    49  		r1 = ret.Error(1)
    50  	}
    51  
    52  	return r0, r1
    53  }
    54  
    55  // MockDebuginfodClient_FetchDebuginfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FetchDebuginfo'
    56  type MockDebuginfodClient_FetchDebuginfo_Call struct {
    57  	*mock.Call
    58  }
    59  
    60  // FetchDebuginfo is a helper method to define mock.On call
    61  //   - ctx context.Context
    62  //   - buildID string
    63  func (_e *MockDebuginfodClient_Expecter) FetchDebuginfo(ctx interface{}, buildID interface{}) *MockDebuginfodClient_FetchDebuginfo_Call {
    64  	return &MockDebuginfodClient_FetchDebuginfo_Call{Call: _e.mock.On("FetchDebuginfo", ctx, buildID)}
    65  }
    66  
    67  func (_c *MockDebuginfodClient_FetchDebuginfo_Call) Run(run func(ctx context.Context, buildID string)) *MockDebuginfodClient_FetchDebuginfo_Call {
    68  	_c.Call.Run(func(args mock.Arguments) {
    69  		run(args[0].(context.Context), args[1].(string))
    70  	})
    71  	return _c
    72  }
    73  
    74  func (_c *MockDebuginfodClient_FetchDebuginfo_Call) Return(_a0 io.ReadCloser, _a1 error) *MockDebuginfodClient_FetchDebuginfo_Call {
    75  	_c.Call.Return(_a0, _a1)
    76  	return _c
    77  }
    78  
    79  func (_c *MockDebuginfodClient_FetchDebuginfo_Call) RunAndReturn(run func(context.Context, string) (io.ReadCloser, error)) *MockDebuginfodClient_FetchDebuginfo_Call {
    80  	_c.Call.Return(run)
    81  	return _c
    82  }
    83  
    84  // NewMockDebuginfodClient creates a new instance of MockDebuginfodClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    85  // The first argument is typically a *testing.T value.
    86  func NewMockDebuginfodClient(t interface {
    87  	mock.TestingT
    88  	Cleanup(func())
    89  }) *MockDebuginfodClient {
    90  	mock := &MockDebuginfodClient{}
    91  	mock.Mock.Test(t)
    92  
    93  	t.Cleanup(func() { mock.AssertExpectations(t) })
    94  
    95  	return mock
    96  }