-
Notifications
You must be signed in to change notification settings - Fork 69
/
mock_recipe_installer.go
53 lines (41 loc) · 1.62 KB
/
mock_recipe_installer.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
package install
import (
"context"
"github.com/stretchr/testify/mock"
"github.com/newrelic/newrelic-cli/internal/install/types"
)
func (mri *mockRecipeInstaller) promptIfNotLatestCLIVersion(ctx context.Context) error {
args := mri.Called(ctx)
return args.Error(0)
}
func (mri *mockRecipeInstaller) Install() error {
args := mri.Called()
return args.Error(0)
}
func (mri *mockRecipeInstaller) install(ctx context.Context) error {
args := mri.Called(ctx)
return args.Error(0)
}
func (mri *mockRecipeInstaller) assertDiscoveryValid(ctx context.Context, m *types.DiscoveryManifest) error {
args := mri.Called(ctx, m)
return args.Error(0)
}
func (mri *mockRecipeInstaller) discover(ctx context.Context) (*types.DiscoveryManifest, error) {
args := mri.Called(ctx)
return nil, args.Error(1)
}
func (mri *mockRecipeInstaller) executeAndValidate(ctx context.Context, m *types.DiscoveryManifest, r *types.OpenInstallationRecipe, vars types.RecipeVars, assumeYes bool) (string, error) {
args := mri.Called(ctx, m, r, vars)
return args.String(0), args.Error(1)
}
func (mri *mockRecipeInstaller) validateRecipeViaAllMethods(ctx context.Context, r *types.OpenInstallationRecipe, m *types.DiscoveryManifest, vars types.RecipeVars, assumeYes bool) (string, error) {
args := mri.Called(ctx, r, m, vars)
return args.String(0), args.Error(1)
}
func (mri *mockRecipeInstaller) executeAndValidateWithProgress(ctx context.Context, m *types.DiscoveryManifest, r *types.OpenInstallationRecipe, assumeYes bool) (string, error) {
args := mri.Called(ctx, m, r, assumeYes)
return args.String(0), args.Error(1)
}
type mockRecipeInstaller struct {
mock.Mock
}