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

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mockcompactor
     4  
     5  import (
     6  	metastorev1 "github.com/grafana/pyroscope/api/gen/proto/go/metastore/v1"
     7  	iter "github.com/grafana/pyroscope/pkg/iter"
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	time "time"
    11  )
    12  
    13  // MockTombstones is an autogenerated mock type for the Tombstones type
    14  type MockTombstones struct {
    15  	mock.Mock
    16  }
    17  
    18  type MockTombstones_Expecter struct {
    19  	mock *mock.Mock
    20  }
    21  
    22  func (_m *MockTombstones) EXPECT() *MockTombstones_Expecter {
    23  	return &MockTombstones_Expecter{mock: &_m.Mock}
    24  }
    25  
    26  // ListTombstones provides a mock function with given fields: before
    27  func (_m *MockTombstones) ListTombstones(before time.Time) iter.Iterator[*metastorev1.Tombstones] {
    28  	ret := _m.Called(before)
    29  
    30  	if len(ret) == 0 {
    31  		panic("no return value specified for ListTombstones")
    32  	}
    33  
    34  	var r0 iter.Iterator[*metastorev1.Tombstones]
    35  	if rf, ok := ret.Get(0).(func(time.Time) iter.Iterator[*metastorev1.Tombstones]); ok {
    36  		r0 = rf(before)
    37  	} else {
    38  		if ret.Get(0) != nil {
    39  			r0 = ret.Get(0).(iter.Iterator[*metastorev1.Tombstones])
    40  		}
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // MockTombstones_ListTombstones_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTombstones'
    47  type MockTombstones_ListTombstones_Call struct {
    48  	*mock.Call
    49  }
    50  
    51  // ListTombstones is a helper method to define mock.On call
    52  //   - before time.Time
    53  func (_e *MockTombstones_Expecter) ListTombstones(before interface{}) *MockTombstones_ListTombstones_Call {
    54  	return &MockTombstones_ListTombstones_Call{Call: _e.mock.On("ListTombstones", before)}
    55  }
    56  
    57  func (_c *MockTombstones_ListTombstones_Call) Run(run func(before time.Time)) *MockTombstones_ListTombstones_Call {
    58  	_c.Call.Run(func(args mock.Arguments) {
    59  		run(args[0].(time.Time))
    60  	})
    61  	return _c
    62  }
    63  
    64  func (_c *MockTombstones_ListTombstones_Call) Return(_a0 iter.Iterator[*metastorev1.Tombstones]) *MockTombstones_ListTombstones_Call {
    65  	_c.Call.Return(_a0)
    66  	return _c
    67  }
    68  
    69  func (_c *MockTombstones_ListTombstones_Call) RunAndReturn(run func(time.Time) iter.Iterator[*metastorev1.Tombstones]) *MockTombstones_ListTombstones_Call {
    70  	_c.Call.Return(run)
    71  	return _c
    72  }
    73  
    74  // NewMockTombstones creates a new instance of MockTombstones. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    75  // The first argument is typically a *testing.T value.
    76  func NewMockTombstones(t interface {
    77  	mock.TestingT
    78  	Cleanup(func())
    79  }) *MockTombstones {
    80  	mock := &MockTombstones{}
    81  	mock.Mock.Test(t)
    82  
    83  	t.Cleanup(func() { mock.AssertExpectations(t) })
    84  
    85  	return mock
    86  }