-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcontroller_mock.go
More file actions
81 lines (68 loc) · 2.56 KB
/
controller_mock.go
File metadata and controls
81 lines (68 loc) · 2.56 KB
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
package install
import (
"context"
"github.com/replicatedhq/embedded-cluster/api/types"
"github.com/stretchr/testify/mock"
)
var _ Controller = (*MockController)(nil)
// MockController is a mock implementation of the Controller interface
type MockController struct {
mock.Mock
}
// TemplateAppConfig mocks the TemplateAppConfig method
func (m *MockController) TemplateAppConfig(ctx context.Context, values types.AppConfigValues, maskPasswords bool) (types.AppConfig, error) {
args := m.Called(ctx, values, maskPasswords)
return args.Get(0).(types.AppConfig), args.Error(1)
}
// PatchAppConfigValues mocks the PatchAppConfigValues method
func (m *MockController) PatchAppConfigValues(ctx context.Context, values types.AppConfigValues) error {
args := m.Called(ctx, values)
return args.Error(0)
}
// GetAppConfigValues mocks the GetAppConfigValues method
func (m *MockController) GetAppConfigValues(ctx context.Context) (types.AppConfigValues, error) {
args := m.Called(ctx)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(types.AppConfigValues), args.Error(1)
}
// RunAppPreflights mocks the RunAppPreflights method
func (m *MockController) RunAppPreflights(ctx context.Context, opts RunAppPreflightOptions) error {
args := m.Called(ctx, opts)
return args.Error(0)
}
// GetAppPreflightStatus mocks the GetAppPreflightStatus method
func (m *MockController) GetAppPreflightStatus(ctx context.Context) (types.Status, error) {
args := m.Called(ctx)
if args.Get(0) == nil {
return types.Status{}, args.Error(1)
}
return args.Get(0).(types.Status), args.Error(1)
}
// GetAppPreflightOutput mocks the GetAppPreflightOutput method
func (m *MockController) GetAppPreflightOutput(ctx context.Context) (*types.PreflightsOutput, error) {
args := m.Called(ctx)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*types.PreflightsOutput), args.Error(1)
}
// GetAppPreflightTitles mocks the GetAppPreflightTitles method
func (m *MockController) GetAppPreflightTitles(ctx context.Context) ([]string, error) {
args := m.Called(ctx)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).([]string), args.Error(1)
}
// InstallApp mocks the InstallApp method
func (m *MockController) InstallApp(ctx context.Context, opts InstallAppOptions) error {
args := m.Called(ctx, opts)
return args.Error(0)
}
// GetAppInstallStatus mocks the GetAppInstallStatus method
func (m *MockController) GetAppInstallStatus(ctx context.Context) (types.AppInstall, error) {
args := m.Called(ctx)
return args.Get(0).(types.AppInstall), args.Error(1)
}