1
2
3
4
5 package backend
6
7 import (
8 context "context"
9 reflect "reflect"
10
11 v1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
12 parser "github.com/devfile/library/v2/pkg/devfile/parser"
13 gomock "github.com/golang/mock/gomock"
14 api "github.com/redhat-developer/odo/pkg/api"
15 filesystem "github.com/redhat-developer/odo/pkg/testingutil/filesystem"
16 )
17
18
19 type MockInitBackend struct {
20 ctrl *gomock.Controller
21 recorder *MockInitBackendMockRecorder
22 }
23
24
25 type MockInitBackendMockRecorder struct {
26 mock *MockInitBackend
27 }
28
29
30 func NewMockInitBackend(ctrl *gomock.Controller) *MockInitBackend {
31 mock := &MockInitBackend{ctrl: ctrl}
32 mock.recorder = &MockInitBackendMockRecorder{mock}
33 return mock
34 }
35
36
37 func (m *MockInitBackend) EXPECT() *MockInitBackendMockRecorder {
38 return m.recorder
39 }
40
41
42 func (m *MockInitBackend) HandleApplicationPorts(devfileobj parser.DevfileObj, ports []int, flags map[string]string) (parser.DevfileObj, error) {
43 m.ctrl.T.Helper()
44 ret := m.ctrl.Call(m, "HandleApplicationPorts", devfileobj, ports, flags)
45 ret0, _ := ret[0].(parser.DevfileObj)
46 ret1, _ := ret[1].(error)
47 return ret0, ret1
48 }
49
50
51 func (mr *MockInitBackendMockRecorder) HandleApplicationPorts(devfileobj, ports, flags interface{}) *gomock.Call {
52 mr.mock.ctrl.T.Helper()
53 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleApplicationPorts", reflect.TypeOf((*MockInitBackend)(nil).HandleApplicationPorts), devfileobj, ports, flags)
54 }
55
56
57 func (m *MockInitBackend) PersonalizeDevfileConfig(devfileobj parser.DevfileObj) (parser.DevfileObj, error) {
58 m.ctrl.T.Helper()
59 ret := m.ctrl.Call(m, "PersonalizeDevfileConfig", devfileobj)
60 ret0, _ := ret[0].(parser.DevfileObj)
61 ret1, _ := ret[1].(error)
62 return ret0, ret1
63 }
64
65
66 func (mr *MockInitBackendMockRecorder) PersonalizeDevfileConfig(devfileobj interface{}) *gomock.Call {
67 mr.mock.ctrl.T.Helper()
68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersonalizeDevfileConfig", reflect.TypeOf((*MockInitBackend)(nil).PersonalizeDevfileConfig), devfileobj)
69 }
70
71
72 func (m *MockInitBackend) PersonalizeName(devfile parser.DevfileObj, flags map[string]string) (string, error) {
73 m.ctrl.T.Helper()
74 ret := m.ctrl.Call(m, "PersonalizeName", devfile, flags)
75 ret0, _ := ret[0].(string)
76 ret1, _ := ret[1].(error)
77 return ret0, ret1
78 }
79
80
81 func (mr *MockInitBackendMockRecorder) PersonalizeName(devfile, flags interface{}) *gomock.Call {
82 mr.mock.ctrl.T.Helper()
83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersonalizeName", reflect.TypeOf((*MockInitBackend)(nil).PersonalizeName), devfile, flags)
84 }
85
86
87 func (m *MockInitBackend) SelectDevfile(ctx context.Context, flags map[string]string, fs filesystem.Filesystem, dir string) (*api.DetectionResult, error) {
88 m.ctrl.T.Helper()
89 ret := m.ctrl.Call(m, "SelectDevfile", ctx, flags, fs, dir)
90 ret0, _ := ret[0].(*api.DetectionResult)
91 ret1, _ := ret[1].(error)
92 return ret0, ret1
93 }
94
95
96 func (mr *MockInitBackendMockRecorder) SelectDevfile(ctx, flags, fs, dir interface{}) *gomock.Call {
97 mr.mock.ctrl.T.Helper()
98 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDevfile", reflect.TypeOf((*MockInitBackend)(nil).SelectDevfile), ctx, flags, fs, dir)
99 }
100
101
102 func (m *MockInitBackend) SelectStarterProject(devfile parser.DevfileObj, flags map[string]string) (*v1alpha2.StarterProject, error) {
103 m.ctrl.T.Helper()
104 ret := m.ctrl.Call(m, "SelectStarterProject", devfile, flags)
105 ret0, _ := ret[0].(*v1alpha2.StarterProject)
106 ret1, _ := ret[1].(error)
107 return ret0, ret1
108 }
109
110
111 func (mr *MockInitBackendMockRecorder) SelectStarterProject(devfile, flags interface{}) *gomock.Call {
112 mr.mock.ctrl.T.Helper()
113 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectStarterProject", reflect.TypeOf((*MockInitBackend)(nil).SelectStarterProject), devfile, flags)
114 }
115
116
117 func (m *MockInitBackend) Validate(flags map[string]string, fs filesystem.Filesystem, dir string) error {
118 m.ctrl.T.Helper()
119 ret := m.ctrl.Call(m, "Validate", flags, fs, dir)
120 ret0, _ := ret[0].(error)
121 return ret0
122 }
123
124
125 func (mr *MockInitBackendMockRecorder) Validate(flags, fs, dir interface{}) *gomock.Call {
126 mr.mock.ctrl.T.Helper()
127 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockInitBackend)(nil).Validate), flags, fs, dir)
128 }
129
View as plain text