mocks

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockConfig

func NewMockConfig(
	authContext config.AuthContext,
	deviceContext config.DeviceContext,
	targetContext config.TargetContext,
) config.Config

func NewMockTarget

func NewMockTarget(cli run.CLI, bastionIP string, bastionPort int, caRootPEM string) *target.Target

Types

type FakeRecipe

type FakeRecipe struct {
	config_mocks.FakeConfig
	// contains filtered or unexported fields
}

func NewFakeRecipe

func NewFakeRecipe(cli run.CLI) *FakeRecipe

func (*FakeRecipe) AddEnvVars

func (f *FakeRecipe) AddEnvVars(vars map[string]string)

func (*FakeRecipe) BackendType

func (f *FakeRecipe) BackendType() string

func (*FakeRecipe) ConfigPath

func (f *FakeRecipe) ConfigPath() string

func (*FakeRecipe) CookbookName

func (f *FakeRecipe) CookbookName() string

func (*FakeRecipe) CookbookVersion

func (f *FakeRecipe) CookbookVersion() string

func (*FakeRecipe) CreateCLI

func (f *FakeRecipe) CreateCLI(
	workingPath string,
	outputBuffer, errorBuffer io.Writer,
) (run.CLI, error)

func (*FakeRecipe) Description

func (f *FakeRecipe) Description() string

func (*FakeRecipe) GetKeyFieldValues

func (f *FakeRecipe) GetKeyFieldValues() []string

func (*FakeRecipe) GetVariable

func (f *FakeRecipe) GetVariable(name string) (*cookbook.Variable, bool)

func (*FakeRecipe) GetVariables

func (f *FakeRecipe) GetVariables() []*cookbook.Variable

func (*FakeRecipe) IsBastion

func (f *FakeRecipe) IsBastion() bool

func (*FakeRecipe) Name

func (f *FakeRecipe) Name() string

func (*FakeRecipe) PluginPath

func (f *FakeRecipe) PluginPath() string

func (*FakeRecipe) RecipeIaaS

func (f *FakeRecipe) RecipeIaaS() string

func (*FakeRecipe) RecipeKey

func (r *FakeRecipe) RecipeKey() string

func (*FakeRecipe) RecipeName

func (f *FakeRecipe) RecipeName() string

func (*FakeRecipe) RepoTimestamp

func (f *FakeRecipe) RepoTimestamp() string

func (*FakeRecipe) ResourceInstanceDataList

func (f *FakeRecipe) ResourceInstanceDataList() []string

func (*FakeRecipe) ResourceInstanceList

func (f *FakeRecipe) ResourceInstanceList() []string

func (*FakeRecipe) RunPath

func (f *FakeRecipe) RunPath() string

func (*FakeRecipe) SetBastion

func (f *FakeRecipe) SetBastion()

func (*FakeRecipe) SetRecipePath

func (f *FakeRecipe) SetRecipePath(recipePath string)

func (*FakeRecipe) StatePath

func (f *FakeRecipe) StatePath() string

type FakeTargetContext

type FakeTargetContext struct {
	// contains filtered or unexported fields
}

func NewTargetMockContext

func NewTargetMockContext(
	recipePath string,
) *FakeTargetContext

func (*FakeTargetContext) CloudProviderTemplates

func (mctx *FakeTargetContext) CloudProviderTemplates() []provider.CloudProvider

func (*FakeTargetContext) Cookbook

func (mctx *FakeTargetContext) Cookbook() *cookbook.Cookbook

func (*FakeTargetContext) DeleteTarget

func (mctx *FakeTargetContext) DeleteTarget(key string)

func (*FakeTargetContext) GetCloudProvider

func (mctx *FakeTargetContext) GetCloudProvider(iaas string) (provider.CloudProvider, error)

func (*FakeTargetContext) GetCookbookRecipe

func (mctx *FakeTargetContext) GetCookbookRecipe(recipe, iaas string) (cookbook.Recipe, error)

func (*FakeTargetContext) GetTarget

func (mctx *FakeTargetContext) GetTarget(name string) (*target.Target, error)

func (*FakeTargetContext) HasTarget

func (mctx *FakeTargetContext) HasTarget(name string) bool

func (*FakeTargetContext) IsDirty

func (mctx *FakeTargetContext) IsDirty() bool

func (*FakeTargetContext) Load

func (mctx *FakeTargetContext) Load(input io.Reader) error

func (*FakeTargetContext) NewTarget

func (mctx *FakeTargetContext) NewTarget(recipeKey, recipeIaas string) (*target.Target, error)

func (*FakeTargetContext) Reset

func (mctx *FakeTargetContext) Reset() error

func (*FakeTargetContext) Save

func (mctx *FakeTargetContext) Save(output io.Writer) error

func (*FakeTargetContext) SaveCloudProvider

func (mctx *FakeTargetContext) SaveCloudProvider(provider provider.CloudProvider)

func (*FakeTargetContext) SaveCookbookRecipe

func (mctx *FakeTargetContext) SaveCookbookRecipe(recipe cookbook.Recipe)

func (*FakeTargetContext) SaveTarget

func (mctx *FakeTargetContext) SaveTarget(key string, target *target.Target)

func (*FakeTargetContext) TargetSet

func (mctx *FakeTargetContext) TargetSet() *target.TargetSet

type MockConfig

type MockConfig struct {
	// contains filtered or unexported fields
}

func (*MockConfig) AuthContext

func (mc *MockConfig) AuthContext() config.AuthContext

func (*MockConfig) ContextVars

func (mc *MockConfig) ContextVars() map[string]string

func (*MockConfig) DeviceContext

func (mc *MockConfig) DeviceContext() config.DeviceContext

func (*MockConfig) EULAAccepted

func (mc *MockConfig) EULAAccepted() bool

func (*MockConfig) GetConfigAsOf

func (mc *MockConfig) GetConfigAsOf() int64

func (*MockConfig) HasPassphrase

func (mc *MockConfig) HasPassphrase() bool

func (*MockConfig) Initialized

func (mc *MockConfig) Initialized() bool

func (*MockConfig) Load

func (mc *MockConfig) Load() error

func (*MockConfig) Reset

func (mc *MockConfig) Reset() error

func (*MockConfig) Save

func (mc *MockConfig) Save() error

func (*MockConfig) SetConfigAsOf

func (mc *MockConfig) SetConfigAsOf(asOf int64)

func (*MockConfig) SetEULAAccepted

func (mc *MockConfig) SetEULAAccepted()

func (*MockConfig) SetInitialized

func (mc *MockConfig) SetInitialized()

func (*MockConfig) SetKeyTimeout

func (mc *MockConfig) SetKeyTimeout(timeout time.Duration)

func (*MockConfig) SetLoggedInUser

func (mc *MockConfig) SetLoggedInUser(userID, userName string) error

func (*MockConfig) SetPassphrase

func (mc *MockConfig) SetPassphrase(passphrase string)

func (*MockConfig) TargetContext

func (mc *MockConfig) TargetContext() config.TargetContext

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL