mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-08-07 07:14:50 +00:00
5377dd4d7f
* Refactor mock interfaces to use 'any' instead of 'interface{}' for improved type safety and readability across multiple files in the manager and pkg directories.
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
* Update Go version to 1.25.x in CI workflows and remove obsolete Go package files
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
* Add mock implementations for various components in the attestation and SDK packages
- Created mock for MeasurementProvider in pkg/attestation/cmdconfig/mocks/mocks_test.go
- Created mock for Provider in pkg/attestation/mocks/mocks_test.go
- Created mock for Client in pkg/clients/grpc/mocks/mocks_test.go
- Created mock for SDK in pkg/sdk/mocks/mocks_test.go
These mocks are generated using mockery and are intended for unit testing purposes.
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
* Remove autogenerated mock files and update mock usage in tests
- Deleted mocks for gRPC clients in pkg/clients/grpc/mocks/mocks_test.go and pkg/sdk/mocks/mocks_test.go.
- Updated test files in pkg/progressbar/progress_test.go to use the new mock structure without type parameters for gRPC client interfaces.
- Refactored mock generation in pkg/sdk/mocks/sdk.go to streamline the mock creation process and ensure consistency across mock methods.
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
* Update protobuf generated files for events and manager
- Bump protoc-gen-go version from v1.36.5 to v1.36.8 in events.pb.go and manager.pb.go.
- Refactor raw descriptor definitions in events.pb.go and manager.pb.go to use string concatenation for better readability and maintainability.
- Ensure compatibility with the latest protobuf specifications and improve code generation consistency.
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
* Update test commands to use GOTOOLCHAIN for consistent Go version handling
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
* Fix GOTOOLCHAIN usage in test command for consistency
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
---------
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
590 lines
16 KiB
Go
590 lines
16 KiB
Go
// Copyright (c) Ultraviolet
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
"github.com/ultravioletrs/cocos/agent"
|
|
"github.com/ultravioletrs/cocos/pkg/attestation"
|
|
)
|
|
|
|
// NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewService(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Service {
|
|
mock := &Service{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Service is an autogenerated mock type for the Service type
|
|
type Service struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Service_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Service) EXPECT() *Service_Expecter {
|
|
return &Service_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Algo provides a mock function for the type Service
|
|
func (_mock *Service) Algo(ctx context.Context, algorithm agent.Algorithm) error {
|
|
ret := _mock.Called(ctx, algorithm)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Algo")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, agent.Algorithm) error); ok {
|
|
r0 = returnFunc(ctx, algorithm)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_Algo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Algo'
|
|
type Service_Algo_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Algo is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - algorithm agent.Algorithm
|
|
func (_e *Service_Expecter) Algo(ctx interface{}, algorithm interface{}) *Service_Algo_Call {
|
|
return &Service_Algo_Call{Call: _e.mock.On("Algo", ctx, algorithm)}
|
|
}
|
|
|
|
func (_c *Service_Algo_Call) Run(run func(ctx context.Context, algorithm agent.Algorithm)) *Service_Algo_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 agent.Algorithm
|
|
if args[1] != nil {
|
|
arg1 = args[1].(agent.Algorithm)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Algo_Call) Return(err error) *Service_Algo_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Algo_Call) RunAndReturn(run func(ctx context.Context, algorithm agent.Algorithm) error) *Service_Algo_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Attestation provides a mock function for the type Service
|
|
func (_mock *Service) Attestation(ctx context.Context, reportData [64]byte, nonce [32]byte, attType attestation.PlatformType) ([]byte, error) {
|
|
ret := _mock.Called(ctx, reportData, nonce, attType)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Attestation")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, [64]byte, [32]byte, attestation.PlatformType) ([]byte, error)); ok {
|
|
return returnFunc(ctx, reportData, nonce, attType)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, [64]byte, [32]byte, attestation.PlatformType) []byte); ok {
|
|
r0 = returnFunc(ctx, reportData, nonce, attType)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, [64]byte, [32]byte, attestation.PlatformType) error); ok {
|
|
r1 = returnFunc(ctx, reportData, nonce, attType)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_Attestation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Attestation'
|
|
type Service_Attestation_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Attestation is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - reportData [64]byte
|
|
// - nonce [32]byte
|
|
// - attType attestation.PlatformType
|
|
func (_e *Service_Expecter) Attestation(ctx interface{}, reportData interface{}, nonce interface{}, attType interface{}) *Service_Attestation_Call {
|
|
return &Service_Attestation_Call{Call: _e.mock.On("Attestation", ctx, reportData, nonce, attType)}
|
|
}
|
|
|
|
func (_c *Service_Attestation_Call) Run(run func(ctx context.Context, reportData [64]byte, nonce [32]byte, attType attestation.PlatformType)) *Service_Attestation_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 [64]byte
|
|
if args[1] != nil {
|
|
arg1 = args[1].([64]byte)
|
|
}
|
|
var arg2 [32]byte
|
|
if args[2] != nil {
|
|
arg2 = args[2].([32]byte)
|
|
}
|
|
var arg3 attestation.PlatformType
|
|
if args[3] != nil {
|
|
arg3 = args[3].(attestation.PlatformType)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Attestation_Call) Return(bytes []byte, err error) *Service_Attestation_Call {
|
|
_c.Call.Return(bytes, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Attestation_Call) RunAndReturn(run func(ctx context.Context, reportData [64]byte, nonce [32]byte, attType attestation.PlatformType) ([]byte, error)) *Service_Attestation_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AzureAttestationToken provides a mock function for the type Service
|
|
func (_mock *Service) AzureAttestationToken(ctx context.Context, nonce [32]byte) ([]byte, error) {
|
|
ret := _mock.Called(ctx, nonce)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AzureAttestationToken")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, [32]byte) ([]byte, error)); ok {
|
|
return returnFunc(ctx, nonce)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, [32]byte) []byte); ok {
|
|
r0 = returnFunc(ctx, nonce)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, [32]byte) error); ok {
|
|
r1 = returnFunc(ctx, nonce)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_AzureAttestationToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AzureAttestationToken'
|
|
type Service_AzureAttestationToken_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AzureAttestationToken is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - nonce [32]byte
|
|
func (_e *Service_Expecter) AzureAttestationToken(ctx interface{}, nonce interface{}) *Service_AzureAttestationToken_Call {
|
|
return &Service_AzureAttestationToken_Call{Call: _e.mock.On("AzureAttestationToken", ctx, nonce)}
|
|
}
|
|
|
|
func (_c *Service_AzureAttestationToken_Call) Run(run func(ctx context.Context, nonce [32]byte)) *Service_AzureAttestationToken_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 [32]byte
|
|
if args[1] != nil {
|
|
arg1 = args[1].([32]byte)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_AzureAttestationToken_Call) Return(bytes []byte, err error) *Service_AzureAttestationToken_Call {
|
|
_c.Call.Return(bytes, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_AzureAttestationToken_Call) RunAndReturn(run func(ctx context.Context, nonce [32]byte) ([]byte, error)) *Service_AzureAttestationToken_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Data provides a mock function for the type Service
|
|
func (_mock *Service) Data(ctx context.Context, dataset agent.Dataset) error {
|
|
ret := _mock.Called(ctx, dataset)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Data")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, agent.Dataset) error); ok {
|
|
r0 = returnFunc(ctx, dataset)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Data'
|
|
type Service_Data_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Data is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dataset agent.Dataset
|
|
func (_e *Service_Expecter) Data(ctx interface{}, dataset interface{}) *Service_Data_Call {
|
|
return &Service_Data_Call{Call: _e.mock.On("Data", ctx, dataset)}
|
|
}
|
|
|
|
func (_c *Service_Data_Call) Run(run func(ctx context.Context, dataset agent.Dataset)) *Service_Data_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 agent.Dataset
|
|
if args[1] != nil {
|
|
arg1 = args[1].(agent.Dataset)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Data_Call) Return(err error) *Service_Data_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Data_Call) RunAndReturn(run func(ctx context.Context, dataset agent.Dataset) error) *Service_Data_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IMAMeasurements provides a mock function for the type Service
|
|
func (_mock *Service) IMAMeasurements(ctx context.Context) ([]byte, []byte, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IMAMeasurements")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 []byte
|
|
var r2 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]byte, []byte, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []byte); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) []byte); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).([]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(2).(func(context.Context) error); ok {
|
|
r2 = returnFunc(ctx)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// Service_IMAMeasurements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IMAMeasurements'
|
|
type Service_IMAMeasurements_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IMAMeasurements is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Service_Expecter) IMAMeasurements(ctx interface{}) *Service_IMAMeasurements_Call {
|
|
return &Service_IMAMeasurements_Call{Call: _e.mock.On("IMAMeasurements", ctx)}
|
|
}
|
|
|
|
func (_c *Service_IMAMeasurements_Call) Run(run func(ctx context.Context)) *Service_IMAMeasurements_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_IMAMeasurements_Call) Return(bytes []byte, bytes1 []byte, err error) *Service_IMAMeasurements_Call {
|
|
_c.Call.Return(bytes, bytes1, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_IMAMeasurements_Call) RunAndReturn(run func(ctx context.Context) ([]byte, []byte, error)) *Service_IMAMeasurements_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// InitComputation provides a mock function for the type Service
|
|
func (_mock *Service) InitComputation(ctx context.Context, cmp agent.Computation) error {
|
|
ret := _mock.Called(ctx, cmp)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for InitComputation")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, agent.Computation) error); ok {
|
|
r0 = returnFunc(ctx, cmp)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_InitComputation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitComputation'
|
|
type Service_InitComputation_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// InitComputation is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cmp agent.Computation
|
|
func (_e *Service_Expecter) InitComputation(ctx interface{}, cmp interface{}) *Service_InitComputation_Call {
|
|
return &Service_InitComputation_Call{Call: _e.mock.On("InitComputation", ctx, cmp)}
|
|
}
|
|
|
|
func (_c *Service_InitComputation_Call) Run(run func(ctx context.Context, cmp agent.Computation)) *Service_InitComputation_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 agent.Computation
|
|
if args[1] != nil {
|
|
arg1 = args[1].(agent.Computation)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_InitComputation_Call) Return(err error) *Service_InitComputation_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_InitComputation_Call) RunAndReturn(run func(ctx context.Context, cmp agent.Computation) error) *Service_InitComputation_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Result provides a mock function for the type Service
|
|
func (_mock *Service) Result(ctx context.Context) ([]byte, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Result")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []byte); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_Result_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Result'
|
|
type Service_Result_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Result is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Service_Expecter) Result(ctx interface{}) *Service_Result_Call {
|
|
return &Service_Result_Call{Call: _e.mock.On("Result", ctx)}
|
|
}
|
|
|
|
func (_c *Service_Result_Call) Run(run func(ctx context.Context)) *Service_Result_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Result_Call) Return(bytes []byte, err error) *Service_Result_Call {
|
|
_c.Call.Return(bytes, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_Result_Call) RunAndReturn(run func(ctx context.Context) ([]byte, error)) *Service_Result_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// State provides a mock function for the type Service
|
|
func (_mock *Service) State() string {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for State")
|
|
}
|
|
|
|
var r0 string
|
|
if returnFunc, ok := ret.Get(0).(func() string); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State'
|
|
type Service_State_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// State is a helper method to define mock.On call
|
|
func (_e *Service_Expecter) State() *Service_State_Call {
|
|
return &Service_State_Call{Call: _e.mock.On("State")}
|
|
}
|
|
|
|
func (_c *Service_State_Call) Run(run func()) *Service_State_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_State_Call) Return(s string) *Service_State_Call {
|
|
_c.Call.Return(s)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_State_Call) RunAndReturn(run func() string) *Service_State_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// StopComputation provides a mock function for the type Service
|
|
func (_mock *Service) StopComputation(ctx context.Context) error {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for StopComputation")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_StopComputation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopComputation'
|
|
type Service_StopComputation_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// StopComputation is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Service_Expecter) StopComputation(ctx interface{}) *Service_StopComputation_Call {
|
|
return &Service_StopComputation_Call{Call: _e.mock.On("StopComputation", ctx)}
|
|
}
|
|
|
|
func (_c *Service_StopComputation_Call) Run(run func(ctx context.Context)) *Service_StopComputation_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_StopComputation_Call) Return(err error) *Service_StopComputation_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_StopComputation_Call) RunAndReturn(run func(ctx context.Context) error) *Service_StopComputation_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|