1
2
3
4
5 package delete
6
7 import (
8 context "context"
9 reflect "reflect"
10
11 parser "github.com/devfile/library/v2/pkg/devfile/parser"
12 gomock "github.com/golang/mock/gomock"
13 v1 "k8s.io/api/core/v1"
14 unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
15 )
16
17
18 type MockClient struct {
19 ctrl *gomock.Controller
20 recorder *MockClientMockRecorder
21 }
22
23
24 type MockClientMockRecorder struct {
25 mock *MockClient
26 }
27
28
29 func NewMockClient(ctrl *gomock.Controller) *MockClient {
30 mock := &MockClient{ctrl: ctrl}
31 mock.recorder = &MockClientMockRecorder{mock}
32 return mock
33 }
34
35
36 func (m *MockClient) EXPECT() *MockClientMockRecorder {
37 return m.recorder
38 }
39
40
41 func (m *MockClient) DeleteResources(resources []unstructured.Unstructured, wait bool) []unstructured.Unstructured {
42 m.ctrl.T.Helper()
43 ret := m.ctrl.Call(m, "DeleteResources", resources, wait)
44 ret0, _ := ret[0].([]unstructured.Unstructured)
45 return ret0
46 }
47
48
49 func (mr *MockClientMockRecorder) DeleteResources(resources, wait interface{}) *gomock.Call {
50 mr.mock.ctrl.T.Helper()
51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteResources", reflect.TypeOf((*MockClient)(nil).DeleteResources), resources, wait)
52 }
53
54
55 func (m *MockClient) ExecutePreStopEvents(ctx context.Context, devfileObj parser.DevfileObj, appName, componentName string) error {
56 m.ctrl.T.Helper()
57 ret := m.ctrl.Call(m, "ExecutePreStopEvents", ctx, devfileObj, appName, componentName)
58 ret0, _ := ret[0].(error)
59 return ret0
60 }
61
62
63 func (mr *MockClientMockRecorder) ExecutePreStopEvents(ctx, devfileObj, appName, componentName interface{}) *gomock.Call {
64 mr.mock.ctrl.T.Helper()
65 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutePreStopEvents", reflect.TypeOf((*MockClient)(nil).ExecutePreStopEvents), ctx, devfileObj, appName, componentName)
66 }
67
68
69 func (m *MockClient) ListClusterResourcesToDelete(ctx context.Context, componentName, namespace, mode string) ([]unstructured.Unstructured, error) {
70 m.ctrl.T.Helper()
71 ret := m.ctrl.Call(m, "ListClusterResourcesToDelete", ctx, componentName, namespace, mode)
72 ret0, _ := ret[0].([]unstructured.Unstructured)
73 ret1, _ := ret[1].(error)
74 return ret0, ret1
75 }
76
77
78 func (mr *MockClientMockRecorder) ListClusterResourcesToDelete(ctx, componentName, namespace, mode interface{}) *gomock.Call {
79 mr.mock.ctrl.T.Helper()
80 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClusterResourcesToDelete", reflect.TypeOf((*MockClient)(nil).ListClusterResourcesToDelete), ctx, componentName, namespace, mode)
81 }
82
83
84 func (m *MockClient) ListClusterResourcesToDeleteFromDevfile(devfileObj parser.DevfileObj, appName, componentName, mode string) (bool, []unstructured.Unstructured, error) {
85 m.ctrl.T.Helper()
86 ret := m.ctrl.Call(m, "ListClusterResourcesToDeleteFromDevfile", devfileObj, appName, componentName, mode)
87 ret0, _ := ret[0].(bool)
88 ret1, _ := ret[1].([]unstructured.Unstructured)
89 ret2, _ := ret[2].(error)
90 return ret0, ret1, ret2
91 }
92
93
94 func (mr *MockClientMockRecorder) ListClusterResourcesToDeleteFromDevfile(devfileObj, appName, componentName, mode interface{}) *gomock.Call {
95 mr.mock.ctrl.T.Helper()
96 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClusterResourcesToDeleteFromDevfile", reflect.TypeOf((*MockClient)(nil).ListClusterResourcesToDeleteFromDevfile), devfileObj, appName, componentName, mode)
97 }
98
99
100 func (m *MockClient) ListPodmanResourcesToDelete(appName, componentName, mode string) (bool, []*v1.Pod, error) {
101 m.ctrl.T.Helper()
102 ret := m.ctrl.Call(m, "ListPodmanResourcesToDelete", appName, componentName, mode)
103 ret0, _ := ret[0].(bool)
104 ret1, _ := ret[1].([]*v1.Pod)
105 ret2, _ := ret[2].(error)
106 return ret0, ret1, ret2
107 }
108
109
110 func (mr *MockClientMockRecorder) ListPodmanResourcesToDelete(appName, componentName, mode interface{}) *gomock.Call {
111 mr.mock.ctrl.T.Helper()
112 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPodmanResourcesToDelete", reflect.TypeOf((*MockClient)(nil).ListPodmanResourcesToDelete), appName, componentName, mode)
113 }
114
View as plain text