예제 #1
0
func init() {
	commandregistry.Register(&CreateSpaceQuota{})
}
예제 #2
0
파일: set_env.go 프로젝트: jasonkeene/cli
func init() {
	commandregistry.Register(&SetEnv{})
}
func init() {
	commandregistry.Register(&RunningEnvironmentVariableGroup{})
}
예제 #4
0
파일: ssh_test.go 프로젝트: Reejoshi/cli
		//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
파일: spaces.go 프로젝트: yingkitw/cli
func init() {
	commandregistry.Register(&ListSpaces{})
}
예제 #6
0
파일: space.go 프로젝트: jasonkeene/cli
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
파일: restart_test.go 프로젝트: jsloyer/cli
		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
파일: orgs.go 프로젝트: Reejoshi/cli
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
파일: create_org.go 프로젝트: yingkitw/cli
func init() {
	commandregistry.Register(&CreateOrg{})
}
예제 #24
0
func init() {
	commandregistry.Register(&CreateDomain{})
}
예제 #25
0
파일: oauth_token.go 프로젝트: yingkitw/cli
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
파일: api.go 프로젝트: yingkitw/cli
func init() {
	commandregistry.Register(Api{})
}
예제 #29
0
func init() {
	commandregistry.Register(&AllowSpaceSSH{})
}
예제 #30
0
func init() {
	commandregistry.Register(&DeleteUser{})
}