mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Add alizer library and test functionality <!-- Thank you for opening a PR! Here are some things you need to know before submitting: 1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines 2. Label this PR accordingly with the '/kind' line 3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests 4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review Documentation: If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs --> **What type of PR is this:** <!-- Add one of the following kinds: /kind bug /kind cleanup /kind tests /kind documentation Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well. --> /kind feature **What does this PR do / why we need it:** Adds the alizer library from https://github.com/redhat-developer/alizer/tree/main/go as part of our implementaion of `odo dev` and `odo init`. This builds upon @feloy 's PR located here: https://github.com/redhat-developer/odo/pull/5434 **Which issue(s) this PR fixes:** <!-- Specifying the issue will automatically close it when this PR is merged --> Fixes # **PR acceptance criteria:** - [X] Unit test - [X] Integration test - [X] Documentation **How to test changes / Special notes to the reviewer:** N/A. Only function implementation * New alizer version * Use alizer for odo init * Add integration tests * Add Alizer to odo deploy * review * Ask component name for odo deploy * Fix unit test Co-authored-by: Charlie Drage <charlie@charliedrage.com>
113 lines
3.5 KiB
Go
113 lines
3.5 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: pkg/init/asker/interface.go
|
|
|
|
// Package asker is a generated GoMock package.
|
|
package asker
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
catalog "github.com/redhat-developer/odo/pkg/catalog"
|
|
)
|
|
|
|
// MockAsker is a mock of Asker interface.
|
|
type MockAsker struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockAskerMockRecorder
|
|
}
|
|
|
|
// MockAskerMockRecorder is the mock recorder for MockAsker.
|
|
type MockAskerMockRecorder struct {
|
|
mock *MockAsker
|
|
}
|
|
|
|
// NewMockAsker creates a new mock instance.
|
|
func NewMockAsker(ctrl *gomock.Controller) *MockAsker {
|
|
mock := &MockAsker{ctrl: ctrl}
|
|
mock.recorder = &MockAskerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockAsker) EXPECT() *MockAskerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// AskCorrect mocks base method.
|
|
func (m *MockAsker) AskCorrect() (bool, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "AskCorrect")
|
|
ret0, _ := ret[0].(bool)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// AskCorrect indicates an expected call of AskCorrect.
|
|
func (mr *MockAskerMockRecorder) AskCorrect() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskCorrect", reflect.TypeOf((*MockAsker)(nil).AskCorrect))
|
|
}
|
|
|
|
// AskLanguage mocks base method.
|
|
func (m *MockAsker) AskLanguage(langs []string) (string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "AskLanguage", langs)
|
|
ret0, _ := ret[0].(string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// AskLanguage indicates an expected call of AskLanguage.
|
|
func (mr *MockAskerMockRecorder) AskLanguage(langs interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskLanguage", reflect.TypeOf((*MockAsker)(nil).AskLanguage), langs)
|
|
}
|
|
|
|
// AskName mocks base method.
|
|
func (m *MockAsker) AskName(defaultName string) (string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "AskName", defaultName)
|
|
ret0, _ := ret[0].(string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// AskName indicates an expected call of AskName.
|
|
func (mr *MockAskerMockRecorder) AskName(defaultName interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskName", reflect.TypeOf((*MockAsker)(nil).AskName), defaultName)
|
|
}
|
|
|
|
// AskStarterProject mocks base method.
|
|
func (m *MockAsker) AskStarterProject(projects []string) (bool, int, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "AskStarterProject", projects)
|
|
ret0, _ := ret[0].(bool)
|
|
ret1, _ := ret[1].(int)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// AskStarterProject indicates an expected call of AskStarterProject.
|
|
func (mr *MockAskerMockRecorder) AskStarterProject(projects interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskStarterProject", reflect.TypeOf((*MockAsker)(nil).AskStarterProject), projects)
|
|
}
|
|
|
|
// AskType mocks base method.
|
|
func (m *MockAsker) AskType(types catalog.TypesWithDetails) (bool, catalog.DevfileComponentType, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "AskType", types)
|
|
ret0, _ := ret[0].(bool)
|
|
ret1, _ := ret[1].(catalog.DevfileComponentType)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// AskType indicates an expected call of AskType.
|
|
func (mr *MockAskerMockRecorder) AskType(types interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskType", reflect.TypeOf((*MockAsker)(nil).AskType), types)
|
|
}
|