github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/computation_result_upload_status.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // ComputationResultUploadStatus is an autogenerated mock type for the ComputationResultUploadStatus type
    11  type ComputationResultUploadStatus struct {
    12  	mock.Mock
    13  }
    14  
    15  // ByID provides a mock function with given fields: blockID
    16  func (_m *ComputationResultUploadStatus) ByID(blockID flow.Identifier) (bool, error) {
    17  	ret := _m.Called(blockID)
    18  
    19  	var r0 bool
    20  	var r1 error
    21  	if rf, ok := ret.Get(0).(func(flow.Identifier) (bool, error)); ok {
    22  		return rf(blockID)
    23  	}
    24  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    25  		r0 = rf(blockID)
    26  	} else {
    27  		r0 = ret.Get(0).(bool)
    28  	}
    29  
    30  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    31  		r1 = rf(blockID)
    32  	} else {
    33  		r1 = ret.Error(1)
    34  	}
    35  
    36  	return r0, r1
    37  }
    38  
    39  // GetIDsByUploadStatus provides a mock function with given fields: targetUploadStatus
    40  func (_m *ComputationResultUploadStatus) GetIDsByUploadStatus(targetUploadStatus bool) ([]flow.Identifier, error) {
    41  	ret := _m.Called(targetUploadStatus)
    42  
    43  	var r0 []flow.Identifier
    44  	var r1 error
    45  	if rf, ok := ret.Get(0).(func(bool) ([]flow.Identifier, error)); ok {
    46  		return rf(targetUploadStatus)
    47  	}
    48  	if rf, ok := ret.Get(0).(func(bool) []flow.Identifier); ok {
    49  		r0 = rf(targetUploadStatus)
    50  	} else {
    51  		if ret.Get(0) != nil {
    52  			r0 = ret.Get(0).([]flow.Identifier)
    53  		}
    54  	}
    55  
    56  	if rf, ok := ret.Get(1).(func(bool) error); ok {
    57  		r1 = rf(targetUploadStatus)
    58  	} else {
    59  		r1 = ret.Error(1)
    60  	}
    61  
    62  	return r0, r1
    63  }
    64  
    65  // Remove provides a mock function with given fields: blockID
    66  func (_m *ComputationResultUploadStatus) Remove(blockID flow.Identifier) error {
    67  	ret := _m.Called(blockID)
    68  
    69  	var r0 error
    70  	if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok {
    71  		r0 = rf(blockID)
    72  	} else {
    73  		r0 = ret.Error(0)
    74  	}
    75  
    76  	return r0
    77  }
    78  
    79  // Upsert provides a mock function with given fields: blockID, wasUploadCompleted
    80  func (_m *ComputationResultUploadStatus) Upsert(blockID flow.Identifier, wasUploadCompleted bool) error {
    81  	ret := _m.Called(blockID, wasUploadCompleted)
    82  
    83  	var r0 error
    84  	if rf, ok := ret.Get(0).(func(flow.Identifier, bool) error); ok {
    85  		r0 = rf(blockID, wasUploadCompleted)
    86  	} else {
    87  		r0 = ret.Error(0)
    88  	}
    89  
    90  	return r0
    91  }
    92  
    93  type mockConstructorTestingTNewComputationResultUploadStatus interface {
    94  	mock.TestingT
    95  	Cleanup(func())
    96  }
    97  
    98  // NewComputationResultUploadStatus creates a new instance of ComputationResultUploadStatus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    99  func NewComputationResultUploadStatus(t mockConstructorTestingTNewComputationResultUploadStatus) *ComputationResultUploadStatus {
   100  	mock := &ComputationResultUploadStatus{}
   101  	mock.Mock.Test(t)
   102  
   103  	t.Cleanup(func() { mock.AssertExpectations(t) })
   104  
   105  	return mock
   106  }