commands

package
v6.12.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

Index

Constants

View Source
const (
	RunCommandResultSuccess            = iota
	RunCommandResultFailed             = iota
	RunCommandResultRequirementsFailed = iota
)

Variables

This section is empty.

Functions

func RunCliCommand

func RunCliCommand(cmdName string, args []string, requirementsFactory *testreq.FakeReqFactory, updateFunc func(bool), pluginCall bool) (passedRequirements bool)

func RunCliCommandWithoutDependency

func RunCliCommandWithoutDependency(cmdName string, args []string, requirementsFactory *testreq.FakeReqFactory) (passedRequirements bool)

Types

type FakeApiEndpointSetter

type FakeApiEndpointSetter struct {
	SetEndpoint string
}

func (*FakeApiEndpointSetter) SetApiEndpoint

func (setter *FakeApiEndpointSetter) SetApiEndpoint(endpoint string)

type FakeAppBinder

type FakeAppBinder struct {
	AppsToBind        []models.Application
	InstancesToBindTo []models.ServiceInstance
	Params            map[string]interface{}

	BindApplicationReturns struct {
		Error error
	}
}

func (*FakeAppBinder) BindApplication

func (binder *FakeAppBinder) BindApplication(app models.Application, service models.ServiceInstance, paramsMap map[string]interface{}) error

func (*FakeAppBinder) Execute

func (cmd *FakeAppBinder) Execute(_ flags.FlagContext)

func (*FakeAppBinder) MetaData

func (*FakeAppBinder) Requirements

func (cmd *FakeAppBinder) Requirements(_ requirements.Factory, _ flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeAppBinder) SetDependency

type FakeAppDisplayer

type FakeAppDisplayer struct {
	AppToDisplay models.Application
	OrgName      string
	SpaceName    string
}

func (*FakeAppDisplayer) Execute

func (cmd *FakeAppDisplayer) Execute(_ flags.FlagContext)

func (*FakeAppDisplayer) MetaData

func (*FakeAppDisplayer) Requirements

func (cmd *FakeAppDisplayer) Requirements(_ requirements.Factory, _ flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeAppDisplayer) SetDependency

func (*FakeAppDisplayer) ShowApp

func (displayer *FakeAppDisplayer) ShowApp(app models.Application, orgName, spaceName string)

type FakeApplicationRestarter

type FakeApplicationRestarter struct {
	MetaDataStub func() command_registry.CommandMetadata

	SetDependencyStub func(deps command_registry.Dependency, pluginCall bool) command_registry.Command

	RequirementsStub func(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

	ExecuteStub func(context flags.FlagContext)

	ApplicationRestartStub func(app models.Application, orgName string, spaceName string)
	// contains filtered or unexported fields
}

func (*FakeApplicationRestarter) ApplicationRestart

func (fake *FakeApplicationRestarter) ApplicationRestart(app models.Application, orgName string, spaceName string)

func (*FakeApplicationRestarter) ApplicationRestartArgsForCall

func (fake *FakeApplicationRestarter) ApplicationRestartArgsForCall(i int) (models.Application, string, string)

func (*FakeApplicationRestarter) ApplicationRestartCallCount

func (fake *FakeApplicationRestarter) ApplicationRestartCallCount() int

func (*FakeApplicationRestarter) Execute

func (fake *FakeApplicationRestarter) Execute(context flags.FlagContext)

func (*FakeApplicationRestarter) ExecuteArgsForCall

func (fake *FakeApplicationRestarter) ExecuteArgsForCall(i int) flags.FlagContext

func (*FakeApplicationRestarter) ExecuteCallCount

func (fake *FakeApplicationRestarter) ExecuteCallCount() int

func (*FakeApplicationRestarter) MetaData

func (*FakeApplicationRestarter) MetaDataCallCount

func (fake *FakeApplicationRestarter) MetaDataCallCount() int

func (*FakeApplicationRestarter) MetaDataReturns

func (fake *FakeApplicationRestarter) MetaDataReturns(result1 command_registry.CommandMetadata)

func (*FakeApplicationRestarter) Requirements

func (fake *FakeApplicationRestarter) Requirements(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeApplicationRestarter) RequirementsArgsForCall

func (fake *FakeApplicationRestarter) RequirementsArgsForCall(i int) (requirements.Factory, flags.FlagContext)

func (*FakeApplicationRestarter) RequirementsCallCount

func (fake *FakeApplicationRestarter) RequirementsCallCount() int

func (*FakeApplicationRestarter) RequirementsReturns

func (fake *FakeApplicationRestarter) RequirementsReturns(result1 []requirements.Requirement, result2 error)

func (*FakeApplicationRestarter) SetDependency

func (fake *FakeApplicationRestarter) SetDependency(deps command_registry.Dependency, pluginCall bool) command_registry.Command

func (*FakeApplicationRestarter) SetDependencyArgsForCall

func (fake *FakeApplicationRestarter) SetDependencyArgsForCall(i int) (command_registry.Dependency, bool)

func (*FakeApplicationRestarter) SetDependencyCallCount

func (fake *FakeApplicationRestarter) SetDependencyCallCount() int

func (*FakeApplicationRestarter) SetDependencyReturns

func (fake *FakeApplicationRestarter) SetDependencyReturns(result1 command_registry.Command)

type FakeApplicationStarter

type FakeApplicationStarter struct {
	MetaDataStub func() command_registry.CommandMetadata

	SetDependencyStub func(deps command_registry.Dependency, pluginCall bool) command_registry.Command

	RequirementsStub func(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

	ExecuteStub func(context flags.FlagContext)

	SetStartTimeoutInSecondsStub func(timeout int)

	ApplicationStartStub func(app models.Application, orgName string, spaceName string) (updatedApp models.Application, err error)
	// contains filtered or unexported fields
}

func (*FakeApplicationStarter) ApplicationStart

func (fake *FakeApplicationStarter) ApplicationStart(app models.Application, orgName string, spaceName string) (updatedApp models.Application, err error)

func (*FakeApplicationStarter) ApplicationStartArgsForCall

func (fake *FakeApplicationStarter) ApplicationStartArgsForCall(i int) (models.Application, string, string)

func (*FakeApplicationStarter) ApplicationStartCallCount

func (fake *FakeApplicationStarter) ApplicationStartCallCount() int

func (*FakeApplicationStarter) ApplicationStartReturns

func (fake *FakeApplicationStarter) ApplicationStartReturns(result1 models.Application, result2 error)

func (*FakeApplicationStarter) Execute

func (fake *FakeApplicationStarter) Execute(context flags.FlagContext)

func (*FakeApplicationStarter) ExecuteArgsForCall

func (fake *FakeApplicationStarter) ExecuteArgsForCall(i int) flags.FlagContext

func (*FakeApplicationStarter) ExecuteCallCount

func (fake *FakeApplicationStarter) ExecuteCallCount() int

func (*FakeApplicationStarter) MetaData

func (*FakeApplicationStarter) MetaDataCallCount

func (fake *FakeApplicationStarter) MetaDataCallCount() int

func (*FakeApplicationStarter) MetaDataReturns

func (fake *FakeApplicationStarter) MetaDataReturns(result1 command_registry.CommandMetadata)

func (*FakeApplicationStarter) Requirements

func (fake *FakeApplicationStarter) Requirements(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeApplicationStarter) RequirementsArgsForCall

func (fake *FakeApplicationStarter) RequirementsArgsForCall(i int) (requirements.Factory, flags.FlagContext)

func (*FakeApplicationStarter) RequirementsCallCount

func (fake *FakeApplicationStarter) RequirementsCallCount() int

func (*FakeApplicationStarter) RequirementsReturns

func (fake *FakeApplicationStarter) RequirementsReturns(result1 []requirements.Requirement, result2 error)

func (*FakeApplicationStarter) SetDependency

func (fake *FakeApplicationStarter) SetDependency(deps command_registry.Dependency, pluginCall bool) command_registry.Command

func (*FakeApplicationStarter) SetDependencyArgsForCall

func (fake *FakeApplicationStarter) SetDependencyArgsForCall(i int) (command_registry.Dependency, bool)

func (*FakeApplicationStarter) SetDependencyCallCount

func (fake *FakeApplicationStarter) SetDependencyCallCount() int

func (*FakeApplicationStarter) SetDependencyReturns

func (fake *FakeApplicationStarter) SetDependencyReturns(result1 command_registry.Command)

func (*FakeApplicationStarter) SetStartTimeoutInSeconds

func (fake *FakeApplicationStarter) SetStartTimeoutInSeconds(timeout int)

func (*FakeApplicationStarter) SetStartTimeoutInSecondsArgsForCall

func (fake *FakeApplicationStarter) SetStartTimeoutInSecondsArgsForCall(i int) int

func (*FakeApplicationStarter) SetStartTimeoutInSecondsCallCount

func (fake *FakeApplicationStarter) SetStartTimeoutInSecondsCallCount() int

type FakeApplicationStopper

type FakeApplicationStopper struct {
	MetaDataStub func() command_registry.CommandMetadata

	SetDependencyStub func(deps command_registry.Dependency, pluginCall bool) command_registry.Command

	RequirementsStub func(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

	ExecuteStub func(context flags.FlagContext)

	ApplicationStopStub func(app models.Application, orgName string, spaceName string) (updatedApp models.Application, err error)
	// contains filtered or unexported fields
}

func (*FakeApplicationStopper) ApplicationStop

func (fake *FakeApplicationStopper) ApplicationStop(app models.Application, orgName string, spaceName string) (updatedApp models.Application, err error)

func (*FakeApplicationStopper) ApplicationStopArgsForCall

func (fake *FakeApplicationStopper) ApplicationStopArgsForCall(i int) (models.Application, string, string)

func (*FakeApplicationStopper) ApplicationStopCallCount

func (fake *FakeApplicationStopper) ApplicationStopCallCount() int

func (*FakeApplicationStopper) ApplicationStopReturns

func (fake *FakeApplicationStopper) ApplicationStopReturns(result1 models.Application, result2 error)

func (*FakeApplicationStopper) Execute

func (fake *FakeApplicationStopper) Execute(context flags.FlagContext)

func (*FakeApplicationStopper) ExecuteArgsForCall

func (fake *FakeApplicationStopper) ExecuteArgsForCall(i int) flags.FlagContext

func (*FakeApplicationStopper) ExecuteCallCount

func (fake *FakeApplicationStopper) ExecuteCallCount() int

func (*FakeApplicationStopper) MetaData

func (*FakeApplicationStopper) MetaDataCallCount

func (fake *FakeApplicationStopper) MetaDataCallCount() int

func (*FakeApplicationStopper) MetaDataReturns

func (fake *FakeApplicationStopper) MetaDataReturns(result1 command_registry.CommandMetadata)

func (*FakeApplicationStopper) Requirements

func (fake *FakeApplicationStopper) Requirements(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeApplicationStopper) RequirementsArgsForCall

func (fake *FakeApplicationStopper) RequirementsArgsForCall(i int) (requirements.Factory, flags.FlagContext)

func (*FakeApplicationStopper) RequirementsCallCount

func (fake *FakeApplicationStopper) RequirementsCallCount() int

func (*FakeApplicationStopper) RequirementsReturns

func (fake *FakeApplicationStopper) RequirementsReturns(result1 []requirements.Requirement, result2 error)

func (*FakeApplicationStopper) SetDependency

func (fake *FakeApplicationStopper) SetDependency(deps command_registry.Dependency, pluginCall bool) command_registry.Command

func (*FakeApplicationStopper) SetDependencyArgsForCall

func (fake *FakeApplicationStopper) SetDependencyArgsForCall(i int) (command_registry.Dependency, bool)

func (*FakeApplicationStopper) SetDependencyCallCount

func (fake *FakeApplicationStopper) SetDependencyCallCount() int

func (*FakeApplicationStopper) SetDependencyReturns

func (fake *FakeApplicationStopper) SetDependencyReturns(result1 command_registry.Command)

type FakeCommand

type FakeCommand struct {
	MetaDataStub func() command_registry.CommandMetadata

	SetDependencyStub func(deps command_registry.Dependency, pluginCall bool) command_registry.Command

	RequirementsStub func(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

	ExecuteStub func(context flags.FlagContext)
	// contains filtered or unexported fields
}

func (*FakeCommand) Execute

func (fake *FakeCommand) Execute(context flags.FlagContext)

func (*FakeCommand) ExecuteArgsForCall

func (fake *FakeCommand) ExecuteArgsForCall(i int) flags.FlagContext

func (*FakeCommand) ExecuteCallCount

func (fake *FakeCommand) ExecuteCallCount() int

func (*FakeCommand) MetaData

func (fake *FakeCommand) MetaData() command_registry.CommandMetadata

func (*FakeCommand) MetaDataCallCount

func (fake *FakeCommand) MetaDataCallCount() int

func (*FakeCommand) MetaDataReturns

func (fake *FakeCommand) MetaDataReturns(result1 command_registry.CommandMetadata)

func (*FakeCommand) Requirements

func (fake *FakeCommand) Requirements(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeCommand) RequirementsArgsForCall

func (fake *FakeCommand) RequirementsArgsForCall(i int) (requirements.Factory, flags.FlagContext)

func (*FakeCommand) RequirementsCallCount

func (fake *FakeCommand) RequirementsCallCount() int

func (*FakeCommand) RequirementsReturns

func (fake *FakeCommand) RequirementsReturns(result1 []requirements.Requirement, result2 error)

func (*FakeCommand) SetDependency

func (fake *FakeCommand) SetDependency(deps command_registry.Dependency, pluginCall bool) command_registry.Command

func (*FakeCommand) SetDependencyArgsForCall

func (fake *FakeCommand) SetDependencyArgsForCall(i int) (command_registry.Dependency, bool)

func (*FakeCommand) SetDependencyCallCount

func (fake *FakeCommand) SetDependencyCallCount() int

func (*FakeCommand) SetDependencyReturns

func (fake *FakeCommand) SetDependencyReturns(result1 command_registry.Command)

type FakeRouteCreator

type FakeRouteCreator struct {
	CreateRouteHostname     string
	CreateRouteDomainFields models.DomainFields
	CreateRouteSpaceFields  models.SpaceFields
	ReservedRoute           models.Route
}

func (*FakeRouteCreator) CreateRoute

func (cmd *FakeRouteCreator) CreateRoute(hostName string, domain models.DomainFields, space models.SpaceFields) (reservedRoute models.Route, apiErr error)

func (*FakeRouteCreator) Execute

func (cmd *FakeRouteCreator) Execute(_ flags.FlagContext)

func (*FakeRouteCreator) MetaData

func (*FakeRouteCreator) Requirements

func (cmd *FakeRouteCreator) Requirements(_ requirements.Factory, _ flags.FlagContext) (reqs []requirements.Requirement, err error)

func (*FakeRouteCreator) SetDependency

type RunCommandResult

type RunCommandResult int

func RunCommandMoreBetter

func RunCommandMoreBetter(cmdName string, args []string, requirementsFactory *testreq.FakeReqFactory, updateFunc func(bool), pluginCall bool) (result RunCommandResult)

Jump to

Keyboard shortcuts

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