Пример #1
0
func init() {
	commandregistry.Register(&CreateSpaceQuota{})
}
Пример #2
0
func init() {
	commandregistry.Register(&SetEnv{})
}
func init() {
	commandregistry.Register(&RunningEnvironmentVariableGroup{})
}
Пример #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)
	}
Пример #5
0
func init() {
	commandregistry.Register(&ListSpaces{})
}
Пример #6
0
func init() {
	commandregistry.Register(&ShowSpace{})
}
Пример #7
0
func init() {
	commandregistry.Register(&DeleteServiceBroker{})
}
Пример #8
0
func init() {
	commandregistry.Register(&DeleteServiceKey{})
}
Пример #9
0
func init() {
	commandregistry.Register(&CreateSecurityGroup{})
}
Пример #10
0
func init() {
	commandregistry.Register(&ListPluginRepos{})
}
Пример #11
0
func init() {
	commandregistry.Register(&unbindFromStagingGroup{})
}
Пример #12
0
func init() {
	commandregistry.Register(&UpdateBuildpack{})
}
Пример #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)
Пример #14
0
func init() {
	commandregistry.Register(&DeleteServiceAuthTokenFields{})
}
Пример #15
0
func init() {
	commandregistry.Register(&BindService{})
}
Пример #16
0
func init() {
	commandregistry.Register(&ListOrgs{})
}
Пример #17
0
func init() {
	commandregistry.Register(&UnsetSpaceRole{})
}
Пример #18
0
func init() {
	commandregistry.Register(&SetHealthCheck{})
}
Пример #19
0
func init() {
	commandregistry.Register(&DeleteRoute{})
}
Пример #20
0
func init() {
	commandregistry.Register(&RenameServiceBroker{})
}
Пример #21
0
func init() {
	commandregistry.Register(&PluginUninstall{})
}
Пример #22
0
func init() {
	commandregistry.Register(&SSHEnabled{})
}
Пример #23
0
func init() {
	commandregistry.Register(&CreateOrg{})
}
Пример #24
0
func init() {
	commandregistry.Register(&CreateDomain{})
}
Пример #25
0
func init() {
	commandregistry.Register(&OAuthToken{})
}
Пример #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{}
Пример #27
0
func init() {
	commandregistry.Register(&DisableServiceAccess{})
}
Пример #28
0
func init() {
	commandregistry.Register(Api{})
}
Пример #29
0
func init() {
	commandregistry.Register(&AllowSpaceSSH{})
}
Пример #30
0
func init() {
	commandregistry.Register(&DeleteUser{})
}