diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableLaunchPlan.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableLaunchPlan.go new file mode 100644 index 0000000000..09298b29d1 --- /dev/null +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableLaunchPlan.go @@ -0,0 +1,115 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + mock "github.com/stretchr/testify/mock" +) + +// ExecutableLaunchPlan is an autogenerated mock type for the ExecutableLaunchPlan type +type ExecutableLaunchPlan struct { + mock.Mock +} + +type ExecutableLaunchPlan_GetFixedInputs struct { + *mock.Call +} + +func (_m ExecutableLaunchPlan_GetFixedInputs) Return(_a0 *core.LiteralMap) *ExecutableLaunchPlan_GetFixedInputs { + return &ExecutableLaunchPlan_GetFixedInputs{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableLaunchPlan) OnGetFixedInputs() *ExecutableLaunchPlan_GetFixedInputs { + c_call := _m.On("GetFixedInputs") + return &ExecutableLaunchPlan_GetFixedInputs{Call: c_call} +} + +func (_m *ExecutableLaunchPlan) OnGetFixedInputsMatch(matchers ...interface{}) *ExecutableLaunchPlan_GetFixedInputs { + c_call := _m.On("GetFixedInputs", matchers...) + return &ExecutableLaunchPlan_GetFixedInputs{Call: c_call} +} + +// GetFixedInputs provides a mock function with given fields: +func (_m *ExecutableLaunchPlan) GetFixedInputs() *core.LiteralMap { + ret := _m.Called() + + var r0 *core.LiteralMap + if rf, ok := ret.Get(0).(func() *core.LiteralMap); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.LiteralMap) + } + } + + return r0 +} + +type ExecutableLaunchPlan_GetId struct { + *mock.Call +} + +func (_m ExecutableLaunchPlan_GetId) Return(_a0 *core.Identifier) *ExecutableLaunchPlan_GetId { + return &ExecutableLaunchPlan_GetId{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableLaunchPlan) OnGetId() *ExecutableLaunchPlan_GetId { + c_call := _m.On("GetId") + return &ExecutableLaunchPlan_GetId{Call: c_call} +} + +func (_m *ExecutableLaunchPlan) OnGetIdMatch(matchers ...interface{}) *ExecutableLaunchPlan_GetId { + c_call := _m.On("GetId", matchers...) + return &ExecutableLaunchPlan_GetId{Call: c_call} +} + +// GetId provides a mock function with given fields: +func (_m *ExecutableLaunchPlan) GetId() *core.Identifier { + ret := _m.Called() + + var r0 *core.Identifier + if rf, ok := ret.Get(0).(func() *core.Identifier); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.Identifier) + } + } + + return r0 +} + +type ExecutableLaunchPlan_GetInterface struct { + *mock.Call +} + +func (_m ExecutableLaunchPlan_GetInterface) Return(_a0 *core.TypedInterface) *ExecutableLaunchPlan_GetInterface { + return &ExecutableLaunchPlan_GetInterface{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableLaunchPlan) OnGetInterface() *ExecutableLaunchPlan_GetInterface { + c_call := _m.On("GetInterface") + return &ExecutableLaunchPlan_GetInterface{Call: c_call} +} + +func (_m *ExecutableLaunchPlan) OnGetInterfaceMatch(matchers ...interface{}) *ExecutableLaunchPlan_GetInterface { + c_call := _m.On("GetInterface", matchers...) + return &ExecutableLaunchPlan_GetInterface{Call: c_call} +} + +// GetInterface provides a mock function with given fields: +func (_m *ExecutableLaunchPlan) GetInterface() *core.TypedInterface { + ret := _m.Called() + + var r0 *core.TypedInterface + if rf, ok := ret.Get(0).(func() *core.TypedInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.TypedInterface) + } + } + + return r0 +} diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableSubWorkflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableSubWorkflow.go index 87c8019a31..2b6f366606 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableSubWorkflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableSubWorkflow.go @@ -3,8 +3,10 @@ package mocks import ( - v1alpha1 "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" + core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" mock "github.com/stretchr/testify/mock" + + v1alpha1 "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) // ExecutableSubWorkflow is an autogenerated mock type for the ExecutableSubWorkflow type @@ -119,6 +121,74 @@ func (_m *ExecutableSubWorkflow) GetID() string { return r0 } +type ExecutableSubWorkflow_GetIdentifier struct { + *mock.Call +} + +func (_m ExecutableSubWorkflow_GetIdentifier) Return(_a0 *core.Identifier) *ExecutableSubWorkflow_GetIdentifier { + return &ExecutableSubWorkflow_GetIdentifier{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableSubWorkflow) OnGetIdentifier() *ExecutableSubWorkflow_GetIdentifier { + c_call := _m.On("GetIdentifier") + return &ExecutableSubWorkflow_GetIdentifier{Call: c_call} +} + +func (_m *ExecutableSubWorkflow) OnGetIdentifierMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetIdentifier { + c_call := _m.On("GetIdentifier", matchers...) + return &ExecutableSubWorkflow_GetIdentifier{Call: c_call} +} + +// GetIdentifier provides a mock function with given fields: +func (_m *ExecutableSubWorkflow) GetIdentifier() *core.Identifier { + ret := _m.Called() + + var r0 *core.Identifier + if rf, ok := ret.Get(0).(func() *core.Identifier); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.Identifier) + } + } + + return r0 +} + +type ExecutableSubWorkflow_GetInterface struct { + *mock.Call +} + +func (_m ExecutableSubWorkflow_GetInterface) Return(_a0 *core.TypedInterface) *ExecutableSubWorkflow_GetInterface { + return &ExecutableSubWorkflow_GetInterface{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableSubWorkflow) OnGetInterface() *ExecutableSubWorkflow_GetInterface { + c_call := _m.On("GetInterface") + return &ExecutableSubWorkflow_GetInterface{Call: c_call} +} + +func (_m *ExecutableSubWorkflow) OnGetInterfaceMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetInterface { + c_call := _m.On("GetInterface", matchers...) + return &ExecutableSubWorkflow_GetInterface{Call: c_call} +} + +// GetInterface provides a mock function with given fields: +func (_m *ExecutableSubWorkflow) GetInterface() *core.TypedInterface { + ret := _m.Called() + + var r0 *core.TypedInterface + if rf, ok := ret.Get(0).(func() *core.TypedInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.TypedInterface) + } + } + + return r0 +} + type ExecutableSubWorkflow_GetNode struct { *mock.Call } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go index 093a93ac2d..7a3cba78e6 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableWorkflow.go @@ -20,6 +20,40 @@ type ExecutableWorkflow struct { mock.Mock } +type ExecutableWorkflow_FindLaunchPlan struct { + *mock.Call +} + +func (_m ExecutableWorkflow_FindLaunchPlan) Return(_a0 v1alpha1.ExecutableLaunchPlan) *ExecutableWorkflow_FindLaunchPlan { + return &ExecutableWorkflow_FindLaunchPlan{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableWorkflow) OnFindLaunchPlan(id v1alpha1.Identifier) *ExecutableWorkflow_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", id) + return &ExecutableWorkflow_FindLaunchPlan{Call: c_call} +} + +func (_m *ExecutableWorkflow) OnFindLaunchPlanMatch(matchers ...interface{}) *ExecutableWorkflow_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", matchers...) + return &ExecutableWorkflow_FindLaunchPlan{Call: c_call} +} + +// FindLaunchPlan provides a mock function with given fields: id +func (_m *ExecutableWorkflow) FindLaunchPlan(id v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan { + ret := _m.Called(id) + + var r0 v1alpha1.ExecutableLaunchPlan + if rf, ok := ret.Get(0).(func(v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1alpha1.ExecutableLaunchPlan) + } + } + + return r0 +} + type ExecutableWorkflow_FindSubWorkflow struct { *mock.Call } @@ -421,6 +455,74 @@ func (_m *ExecutableWorkflow) GetID() string { return r0 } +type ExecutableWorkflow_GetIdentifier struct { + *mock.Call +} + +func (_m ExecutableWorkflow_GetIdentifier) Return(_a0 *core.Identifier) *ExecutableWorkflow_GetIdentifier { + return &ExecutableWorkflow_GetIdentifier{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableWorkflow) OnGetIdentifier() *ExecutableWorkflow_GetIdentifier { + c_call := _m.On("GetIdentifier") + return &ExecutableWorkflow_GetIdentifier{Call: c_call} +} + +func (_m *ExecutableWorkflow) OnGetIdentifierMatch(matchers ...interface{}) *ExecutableWorkflow_GetIdentifier { + c_call := _m.On("GetIdentifier", matchers...) + return &ExecutableWorkflow_GetIdentifier{Call: c_call} +} + +// GetIdentifier provides a mock function with given fields: +func (_m *ExecutableWorkflow) GetIdentifier() *core.Identifier { + ret := _m.Called() + + var r0 *core.Identifier + if rf, ok := ret.Get(0).(func() *core.Identifier); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.Identifier) + } + } + + return r0 +} + +type ExecutableWorkflow_GetInterface struct { + *mock.Call +} + +func (_m ExecutableWorkflow_GetInterface) Return(_a0 *core.TypedInterface) *ExecutableWorkflow_GetInterface { + return &ExecutableWorkflow_GetInterface{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutableWorkflow) OnGetInterface() *ExecutableWorkflow_GetInterface { + c_call := _m.On("GetInterface") + return &ExecutableWorkflow_GetInterface{Call: c_call} +} + +func (_m *ExecutableWorkflow) OnGetInterfaceMatch(matchers ...interface{}) *ExecutableWorkflow_GetInterface { + c_call := _m.On("GetInterface", matchers...) + return &ExecutableWorkflow_GetInterface{Call: c_call} +} + +// GetInterface provides a mock function with given fields: +func (_m *ExecutableWorkflow) GetInterface() *core.TypedInterface { + ret := _m.Called() + + var r0 *core.TypedInterface + if rf, ok := ret.Get(0).(func() *core.TypedInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.TypedInterface) + } + } + + return r0 +} + type ExecutableWorkflow_GetK8sWorkflowID struct { *mock.Call } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go index 95915088da..7a100d5baf 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/MetaExtended.go @@ -18,6 +18,40 @@ type MetaExtended struct { mock.Mock } +type MetaExtended_FindLaunchPlan struct { + *mock.Call +} + +func (_m MetaExtended_FindLaunchPlan) Return(_a0 v1alpha1.ExecutableLaunchPlan) *MetaExtended_FindLaunchPlan { + return &MetaExtended_FindLaunchPlan{Call: _m.Call.Return(_a0)} +} + +func (_m *MetaExtended) OnFindLaunchPlan(id v1alpha1.Identifier) *MetaExtended_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", id) + return &MetaExtended_FindLaunchPlan{Call: c_call} +} + +func (_m *MetaExtended) OnFindLaunchPlanMatch(matchers ...interface{}) *MetaExtended_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", matchers...) + return &MetaExtended_FindLaunchPlan{Call: c_call} +} + +// FindLaunchPlan provides a mock function with given fields: id +func (_m *MetaExtended) FindLaunchPlan(id v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan { + ret := _m.Called(id) + + var r0 v1alpha1.ExecutableLaunchPlan + if rf, ok := ret.Get(0).(func(v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1alpha1.ExecutableLaunchPlan) + } + } + + return r0 +} + type MetaExtended_FindSubWorkflow struct { *mock.Call } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/SubWorkflowGetter.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/SubWorkflowGetter.go index eb3ceefb30..fa61bc4b0f 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/SubWorkflowGetter.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/SubWorkflowGetter.go @@ -12,6 +12,40 @@ type SubWorkflowGetter struct { mock.Mock } +type SubWorkflowGetter_FindLaunchPlan struct { + *mock.Call +} + +func (_m SubWorkflowGetter_FindLaunchPlan) Return(_a0 v1alpha1.ExecutableLaunchPlan) *SubWorkflowGetter_FindLaunchPlan { + return &SubWorkflowGetter_FindLaunchPlan{Call: _m.Call.Return(_a0)} +} + +func (_m *SubWorkflowGetter) OnFindLaunchPlan(id v1alpha1.Identifier) *SubWorkflowGetter_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", id) + return &SubWorkflowGetter_FindLaunchPlan{Call: c_call} +} + +func (_m *SubWorkflowGetter) OnFindLaunchPlanMatch(matchers ...interface{}) *SubWorkflowGetter_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", matchers...) + return &SubWorkflowGetter_FindLaunchPlan{Call: c_call} +} + +// FindLaunchPlan provides a mock function with given fields: id +func (_m *SubWorkflowGetter) FindLaunchPlan(id v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan { + ret := _m.Called(id) + + var r0 v1alpha1.ExecutableLaunchPlan + if rf, ok := ret.Get(0).(func(v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1alpha1.ExecutableLaunchPlan) + } + } + + return r0 +} + type SubWorkflowGetter_FindSubWorkflow struct { *mock.Call } diff --git a/flytepropeller/pkg/compiler/common/mocks/interface_provider.go b/flytepropeller/pkg/compiler/common/mocks/interface_provider.go index 2d1f1862b2..aa43b6fec9 100644 --- a/flytepropeller/pkg/compiler/common/mocks/interface_provider.go +++ b/flytepropeller/pkg/compiler/common/mocks/interface_provider.go @@ -80,6 +80,40 @@ func (_m *InterfaceProvider) GetExpectedOutputs() *core.VariableMap { return r0 } +type InterfaceProvider_GetFixedInputs struct { + *mock.Call +} + +func (_m InterfaceProvider_GetFixedInputs) Return(_a0 *core.LiteralMap) *InterfaceProvider_GetFixedInputs { + return &InterfaceProvider_GetFixedInputs{Call: _m.Call.Return(_a0)} +} + +func (_m *InterfaceProvider) OnGetFixedInputs() *InterfaceProvider_GetFixedInputs { + c_call := _m.On("GetFixedInputs") + return &InterfaceProvider_GetFixedInputs{Call: c_call} +} + +func (_m *InterfaceProvider) OnGetFixedInputsMatch(matchers ...interface{}) *InterfaceProvider_GetFixedInputs { + c_call := _m.On("GetFixedInputs", matchers...) + return &InterfaceProvider_GetFixedInputs{Call: c_call} +} + +// GetFixedInputs provides a mock function with given fields: +func (_m *InterfaceProvider) GetFixedInputs() *core.LiteralMap { + ret := _m.Called() + + var r0 *core.LiteralMap + if rf, ok := ret.Get(0).(func() *core.LiteralMap); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*core.LiteralMap) + } + } + + return r0 +} + type InterfaceProvider_GetID struct { *mock.Call } diff --git a/flytepropeller/pkg/controller/executors/mocks/execution_context.go b/flytepropeller/pkg/controller/executors/mocks/execution_context.go index 9f4f646cf2..1c1a48233f 100644 --- a/flytepropeller/pkg/controller/executors/mocks/execution_context.go +++ b/flytepropeller/pkg/controller/executors/mocks/execution_context.go @@ -116,6 +116,40 @@ func (_m *ExecutionContext) CurrentTaskExecutionCount() uint32 { return r0 } +type ExecutionContext_FindLaunchPlan struct { + *mock.Call +} + +func (_m ExecutionContext_FindLaunchPlan) Return(_a0 v1alpha1.ExecutableLaunchPlan) *ExecutionContext_FindLaunchPlan { + return &ExecutionContext_FindLaunchPlan{Call: _m.Call.Return(_a0)} +} + +func (_m *ExecutionContext) OnFindLaunchPlan(id v1alpha1.Identifier) *ExecutionContext_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", id) + return &ExecutionContext_FindLaunchPlan{Call: c_call} +} + +func (_m *ExecutionContext) OnFindLaunchPlanMatch(matchers ...interface{}) *ExecutionContext_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", matchers...) + return &ExecutionContext_FindLaunchPlan{Call: c_call} +} + +// FindLaunchPlan provides a mock function with given fields: id +func (_m *ExecutionContext) FindLaunchPlan(id v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan { + ret := _m.Called(id) + + var r0 v1alpha1.ExecutableLaunchPlan + if rf, ok := ret.Get(0).(func(v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1alpha1.ExecutableLaunchPlan) + } + } + + return r0 +} + type ExecutionContext_FindSubWorkflow struct { *mock.Call } diff --git a/flytepropeller/pkg/controller/executors/mocks/sub_workflow_getter.go b/flytepropeller/pkg/controller/executors/mocks/sub_workflow_getter.go index eb3ceefb30..fa61bc4b0f 100644 --- a/flytepropeller/pkg/controller/executors/mocks/sub_workflow_getter.go +++ b/flytepropeller/pkg/controller/executors/mocks/sub_workflow_getter.go @@ -12,6 +12,40 @@ type SubWorkflowGetter struct { mock.Mock } +type SubWorkflowGetter_FindLaunchPlan struct { + *mock.Call +} + +func (_m SubWorkflowGetter_FindLaunchPlan) Return(_a0 v1alpha1.ExecutableLaunchPlan) *SubWorkflowGetter_FindLaunchPlan { + return &SubWorkflowGetter_FindLaunchPlan{Call: _m.Call.Return(_a0)} +} + +func (_m *SubWorkflowGetter) OnFindLaunchPlan(id v1alpha1.Identifier) *SubWorkflowGetter_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", id) + return &SubWorkflowGetter_FindLaunchPlan{Call: c_call} +} + +func (_m *SubWorkflowGetter) OnFindLaunchPlanMatch(matchers ...interface{}) *SubWorkflowGetter_FindLaunchPlan { + c_call := _m.On("FindLaunchPlan", matchers...) + return &SubWorkflowGetter_FindLaunchPlan{Call: c_call} +} + +// FindLaunchPlan provides a mock function with given fields: id +func (_m *SubWorkflowGetter) FindLaunchPlan(id v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan { + ret := _m.Called(id) + + var r0 v1alpha1.ExecutableLaunchPlan + if rf, ok := ret.Get(0).(func(v1alpha1.Identifier) v1alpha1.ExecutableLaunchPlan); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1alpha1.ExecutableLaunchPlan) + } + } + + return r0 +} + type SubWorkflowGetter_FindSubWorkflow struct { *mock.Call }