Files
tasks/chasm/tree_mock.go
Yichao YangandGitHub 89a4eb7855 CHASM: Engine Update/ReadComponent implementation (#7696)
## What changed?
- Implement chasm engine Update/Read Component method

## Why?
- CHASM work stream

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)
2025-05-08 19:21:27 -07:00

225 lines
7.7 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: tree.go
//
// Generated by this command:
//
// mockgen -package chasm -source tree.go -destination tree_mock.go
//
// Package chasm is a generated GoMock package.
package chasm
import (
context "context"
reflect "reflect"
enums "go.temporal.io/api/enums/v1"
enums0 "go.temporal.io/server/api/enums/v1"
persistence "go.temporal.io/server/api/persistence/v1"
definition "go.temporal.io/server/common/definition"
tasks "go.temporal.io/server/service/history/tasks"
gomock "go.uber.org/mock/gomock"
)
// MockNodeBackend is a mock of NodeBackend interface.
type MockNodeBackend struct {
ctrl *gomock.Controller
recorder *MockNodeBackendMockRecorder
isgomock struct{}
}
// MockNodeBackendMockRecorder is the mock recorder for MockNodeBackend.
type MockNodeBackendMockRecorder struct {
mock *MockNodeBackend
}
// NewMockNodeBackend creates a new mock instance.
func NewMockNodeBackend(ctrl *gomock.Controller) *MockNodeBackend {
mock := &MockNodeBackend{ctrl: ctrl}
mock.recorder = &MockNodeBackendMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNodeBackend) EXPECT() *MockNodeBackendMockRecorder {
return m.recorder
}
// AddTasks mocks base method.
func (m *MockNodeBackend) AddTasks(arg0 ...tasks.Task) {
m.ctrl.T.Helper()
varargs := []any{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "AddTasks", varargs...)
}
// AddTasks indicates an expected call of AddTasks.
func (mr *MockNodeBackendMockRecorder) AddTasks(arg0 ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTasks", reflect.TypeOf((*MockNodeBackend)(nil).AddTasks), arg0...)
}
// GetCurrentVersion mocks base method.
func (m *MockNodeBackend) GetCurrentVersion() int64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrentVersion")
ret0, _ := ret[0].(int64)
return ret0
}
// GetCurrentVersion indicates an expected call of GetCurrentVersion.
func (mr *MockNodeBackendMockRecorder) GetCurrentVersion() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentVersion", reflect.TypeOf((*MockNodeBackend)(nil).GetCurrentVersion))
}
// GetExecutionInfo mocks base method.
func (m *MockNodeBackend) GetExecutionInfo() *persistence.WorkflowExecutionInfo {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetExecutionInfo")
ret0, _ := ret[0].(*persistence.WorkflowExecutionInfo)
return ret0
}
// GetExecutionInfo indicates an expected call of GetExecutionInfo.
func (mr *MockNodeBackendMockRecorder) GetExecutionInfo() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionInfo", reflect.TypeOf((*MockNodeBackend)(nil).GetExecutionInfo))
}
// GetWorkflowKey mocks base method.
func (m *MockNodeBackend) GetWorkflowKey() definition.WorkflowKey {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetWorkflowKey")
ret0, _ := ret[0].(definition.WorkflowKey)
return ret0
}
// GetWorkflowKey indicates an expected call of GetWorkflowKey.
func (mr *MockNodeBackendMockRecorder) GetWorkflowKey() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowKey", reflect.TypeOf((*MockNodeBackend)(nil).GetWorkflowKey))
}
// NextTransitionCount mocks base method.
func (m *MockNodeBackend) NextTransitionCount() int64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextTransitionCount")
ret0, _ := ret[0].(int64)
return ret0
}
// NextTransitionCount indicates an expected call of NextTransitionCount.
func (mr *MockNodeBackendMockRecorder) NextTransitionCount() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextTransitionCount", reflect.TypeOf((*MockNodeBackend)(nil).NextTransitionCount))
}
// UpdateWorkflowStateStatus mocks base method.
func (m *MockNodeBackend) UpdateWorkflowStateStatus(state enums0.WorkflowExecutionState, status enums.WorkflowExecutionStatus) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateWorkflowStateStatus", state, status)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateWorkflowStateStatus indicates an expected call of UpdateWorkflowStateStatus.
func (mr *MockNodeBackendMockRecorder) UpdateWorkflowStateStatus(state, status any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWorkflowStateStatus", reflect.TypeOf((*MockNodeBackend)(nil).UpdateWorkflowStateStatus), state, status)
}
// MockNodePathEncoder is a mock of NodePathEncoder interface.
type MockNodePathEncoder struct {
ctrl *gomock.Controller
recorder *MockNodePathEncoderMockRecorder
isgomock struct{}
}
// MockNodePathEncoderMockRecorder is the mock recorder for MockNodePathEncoder.
type MockNodePathEncoderMockRecorder struct {
mock *MockNodePathEncoder
}
// NewMockNodePathEncoder creates a new mock instance.
func NewMockNodePathEncoder(ctrl *gomock.Controller) *MockNodePathEncoder {
mock := &MockNodePathEncoder{ctrl: ctrl}
mock.recorder = &MockNodePathEncoderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNodePathEncoder) EXPECT() *MockNodePathEncoderMockRecorder {
return m.recorder
}
// Decode mocks base method.
func (m *MockNodePathEncoder) Decode(encodedPath string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Decode", encodedPath)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Decode indicates an expected call of Decode.
func (mr *MockNodePathEncoderMockRecorder) Decode(encodedPath any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decode", reflect.TypeOf((*MockNodePathEncoder)(nil).Decode), encodedPath)
}
// Encode mocks base method.
func (m *MockNodePathEncoder) Encode(node *Node, path []string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Encode", node, path)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Encode indicates an expected call of Encode.
func (mr *MockNodePathEncoderMockRecorder) Encode(node, path any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Encode", reflect.TypeOf((*MockNodePathEncoder)(nil).Encode), node, path)
}
// MockNodeExecutePureTask is a mock of NodeExecutePureTask interface.
type MockNodeExecutePureTask struct {
ctrl *gomock.Controller
recorder *MockNodeExecutePureTaskMockRecorder
isgomock struct{}
}
// MockNodeExecutePureTaskMockRecorder is the mock recorder for MockNodeExecutePureTask.
type MockNodeExecutePureTaskMockRecorder struct {
mock *MockNodeExecutePureTask
}
// NewMockNodeExecutePureTask creates a new mock instance.
func NewMockNodeExecutePureTask(ctrl *gomock.Controller) *MockNodeExecutePureTask {
mock := &MockNodeExecutePureTask{ctrl: ctrl}
mock.recorder = &MockNodeExecutePureTaskMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNodeExecutePureTask) EXPECT() *MockNodeExecutePureTaskMockRecorder {
return m.recorder
}
// ExecutePureTask mocks base method.
func (m *MockNodeExecutePureTask) ExecutePureTask(baseCtx context.Context, taskInstance any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExecutePureTask", baseCtx, taskInstance)
ret0, _ := ret[0].(error)
return ret0
}
// ExecutePureTask indicates an expected call of ExecutePureTask.
func (mr *MockNodeExecutePureTaskMockRecorder) ExecutePureTask(baseCtx, taskInstance any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutePureTask", reflect.TypeOf((*MockNodeExecutePureTask)(nil).ExecutePureTask), baseCtx, taskInstance)
}