Ejemplo n.º 1
0
func init() {
	commandregistry.Register(&CreateSpaceQuota{})
}
Ejemplo n.º 2
0
func init() {
	commandregistry.Register(&SetEnv{})
}
func init() {
	commandregistry.Register(&RunningEnvironmentVariableGroup{})
}
Ejemplo n.º 4
0
		//save original command and restore later
		originalSSHCodeGetter = commandregistry.Commands.FindCommand("ssh-code")

		sshCodeGetter = new(commandsfakes.FakeSSHCodeGetter)

		//setup fakes to correctly interact with commandregistry
		sshCodeGetter.SetDependencyStub = func(_ commandregistry.Dependency, _ bool) commandregistry.Command {
			return sshCodeGetter
		}
		sshCodeGetter.MetaDataReturns(commandregistry.CommandMetadata{Name: "ssh-code"})
	})

	AfterEach(func() {
		//restore original command
		commandregistry.Register(originalSSHCodeGetter)
	})

	updateCommandDependency := func(pluginCall bool) {
		deps.UI = ui
		deps.Config = configRepo

		//inject fake 'sshCodeGetter' into registry
		commandregistry.Register(sshCodeGetter)

		commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("ssh").SetDependency(deps, pluginCall))
	}

	runCommand := func(args ...string) bool {
		return testcmd.RunCLICommand("ssh", args, requirementsFactory, updateCommandDependency, false, ui)
	}
Ejemplo n.º 5
0
func init() {
	commandregistry.Register(&ListSpaces{})
}
Ejemplo n.º 6
0
func init() {
	commandregistry.Register(&ShowSpace{})
}
Ejemplo n.º 7
0
func init() {
	commandregistry.Register(&DeleteServiceBroker{})
}
Ejemplo n.º 8
0
func init() {
	commandregistry.Register(&DeleteServiceKey{})
}
Ejemplo n.º 9
0
func init() {
	commandregistry.Register(&CreateSecurityGroup{})
}
Ejemplo n.º 10
0
func init() {
	commandregistry.Register(&ListPluginRepos{})
}
Ejemplo n.º 11
0
func init() {
	commandregistry.Register(&unbindFromStagingGroup{})
}
Ejemplo n.º 12
0
func init() {
	commandregistry.Register(&UpdateBuildpack{})
}
Ejemplo n.º 13
0
		starter             *applicationfakes.FakeStarter
		stopper             *applicationfakes.FakeStopper
		config              coreconfig.Repository
		app                 models.Application
		originalStop        commandregistry.Command
		originalStart       commandregistry.Command
		deps                commandregistry.Dependency
		applicationReq      *requirementsfakes.FakeApplicationRequirement
	)

	updateCommandDependency := func(pluginCall bool) {
		deps.UI = ui
		deps.Config = config

		//inject fake 'stopper and starter' into registry
		commandregistry.Register(starter)
		commandregistry.Register(stopper)

		commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("restart").SetDependency(deps, pluginCall))
	}

	runCommand := func(args ...string) bool {
		return testcmd.RunCLICommand("restart", args, requirementsFactory, updateCommandDependency, false, ui)
	}

	BeforeEach(func() {
		ui = &testterm.FakeUI{}
		deps = commandregistry.NewDependency(os.Stdout, new(tracefakes.FakePrinter))
		requirementsFactory = new(requirementsfakes.FakeFactory)
		starter = new(applicationfakes.FakeStarter)
		stopper = new(applicationfakes.FakeStopper)
Ejemplo n.º 14
0
func init() {
	commandregistry.Register(&DeleteServiceAuthTokenFields{})
}
Ejemplo n.º 15
0
func init() {
	commandregistry.Register(&BindService{})
}
Ejemplo n.º 16
0
Archivo: orgs.go Proyecto: Reejoshi/cli
func init() {
	commandregistry.Register(&ListOrgs{})
}
Ejemplo n.º 17
0
func init() {
	commandregistry.Register(&UnsetSpaceRole{})
}
Ejemplo n.º 18
0
func init() {
	commandregistry.Register(&SetHealthCheck{})
}
Ejemplo n.º 19
0
func init() {
	commandregistry.Register(&DeleteRoute{})
}
Ejemplo n.º 20
0
func init() {
	commandregistry.Register(&RenameServiceBroker{})
}
Ejemplo n.º 21
0
func init() {
	commandregistry.Register(&PluginUninstall{})
}
Ejemplo n.º 22
0
func init() {
	commandregistry.Register(&SSHEnabled{})
}
Ejemplo n.º 23
0
func init() {
	commandregistry.Register(&CreateOrg{})
}
Ejemplo n.º 24
0
func init() {
	commandregistry.Register(&CreateDomain{})
}
Ejemplo n.º 25
0
func init() {
	commandregistry.Register(&OAuthToken{})
}
Ejemplo n.º 26
0
	BeforeEach(func() {
		ui = &testterm.FakeUI{}
		configRepo = testconfig.NewRepositoryWithDefaults()
		routeRepo = new(apifakes.FakeRouteRepository)
		repoLocator := deps.RepoLocator.SetRouteRepository(routeRepo)

		deps = commandregistry.Dependency{
			UI:          ui,
			Config:      configRepo,
			RepoLocator: repoLocator,
		}

		originalCreateRouteCmd = commandregistry.Commands.FindCommand("create-route")
		fakeCreateRouteCmd = new(routefakes.OldFakeRouteCreator)
		commandregistry.Register(fakeCreateRouteCmd)

		cmd = &route.MapRoute{}
		cmd.SetDependency(deps, false)

		flagContext = flags.NewFlagContext(cmd.MetaData().Flags)

		factory = new(requirementsfakes.FakeFactory)

		loginRequirement = &passingRequirement{Name: "login-requirement"}
		factory.NewLoginRequirementReturns(loginRequirement)

		applicationRequirement = new(requirementsfakes.FakeApplicationRequirement)
		factory.NewApplicationRequirementReturns(applicationRequirement)

		fakeApplication := models.Application{}
Ejemplo n.º 27
0
func init() {
	commandregistry.Register(&DisableServiceAccess{})
}
Ejemplo n.º 28
0
Archivo: api.go Proyecto: yingkitw/cli
func init() {
	commandregistry.Register(Api{})
}
Ejemplo n.º 29
0
func init() {
	commandregistry.Register(&AllowSpaceSSH{})
}
Ejemplo n.º 30
0
func init() {
	commandregistry.Register(&DeleteUser{})
}