forked from flyteorg/flytepropeller
/
IFace.go
105 lines (84 loc) · 3.39 KB
/
IFace.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import context "context"
import core "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core"
import handler "github.com/lyft/flytepropeller/pkg/controller/nodes/handler"
import mock "github.com/stretchr/testify/mock"
import v1alpha1 "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1"
// IFace is an autogenerated mock type for the IFace type
type IFace struct {
mock.Mock
}
// AbortNode provides a mock function with given fields: ctx, w, node
func (_m *IFace) AbortNode(ctx context.Context, w v1alpha1.ExecutableWorkflow, node v1alpha1.ExecutableNode) error {
ret := _m.Called(ctx, w, node)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode) error); ok {
r0 = rf(ctx, w, node)
} else {
r0 = ret.Error(0)
}
return r0
}
// CheckNodeStatus provides a mock function with given fields: ctx, w, node, previousNodeStatus
func (_m *IFace) CheckNodeStatus(ctx context.Context, w v1alpha1.ExecutableWorkflow, node v1alpha1.ExecutableNode, previousNodeStatus v1alpha1.ExecutableNodeStatus) (handler.Status, error) {
ret := _m.Called(ctx, w, node, previousNodeStatus)
var r0 handler.Status
if rf, ok := ret.Get(0).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode, v1alpha1.ExecutableNodeStatus) handler.Status); ok {
r0 = rf(ctx, w, node, previousNodeStatus)
} else {
r0 = ret.Get(0).(handler.Status)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode, v1alpha1.ExecutableNodeStatus) error); ok {
r1 = rf(ctx, w, node, previousNodeStatus)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// HandleFailingNode provides a mock function with given fields: ctx, w, node
func (_m *IFace) HandleFailingNode(ctx context.Context, w v1alpha1.ExecutableWorkflow, node v1alpha1.ExecutableNode) (handler.Status, error) {
ret := _m.Called(ctx, w, node)
var r0 handler.Status
if rf, ok := ret.Get(0).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode) handler.Status); ok {
r0 = rf(ctx, w, node)
} else {
r0 = ret.Get(0).(handler.Status)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode) error); ok {
r1 = rf(ctx, w, node)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Initialize provides a mock function with given fields: ctx
func (_m *IFace) Initialize(ctx context.Context) error {
ret := _m.Called(ctx)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// StartNode provides a mock function with given fields: ctx, w, node, nodeInputs
func (_m *IFace) StartNode(ctx context.Context, w v1alpha1.ExecutableWorkflow, node v1alpha1.ExecutableNode, nodeInputs *core.LiteralMap) (handler.Status, error) {
ret := _m.Called(ctx, w, node, nodeInputs)
var r0 handler.Status
if rf, ok := ret.Get(0).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode, *core.LiteralMap) handler.Status); ok {
r0 = rf(ctx, w, node, nodeInputs)
} else {
r0 = ret.Get(0).(handler.Status)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, v1alpha1.ExecutableWorkflow, v1alpha1.ExecutableNode, *core.LiteralMap) error); ok {
r1 = rf(ctx, w, node, nodeInputs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}