コード例 #1
0
ファイル: create_space_quota.go プロジェクト: jasonkeene/cli
func init() {
	commandregistry.Register(&CreateSpaceQuota{})
}
コード例 #2
0
ファイル: set_env.go プロジェクト: jasonkeene/cli
func init() {
	commandregistry.Register(&SetEnv{})
}
コード例 #3
0
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
ファイル: delete_service_key.go プロジェクト: yingkitw/cli
func init() {
	commandregistry.Register(&DeleteServiceKey{})
}
コード例 #9
0
ファイル: create_security_group.go プロジェクト: yingkitw/cli
func init() {
	commandregistry.Register(&CreateSecurityGroup{})
}
コード例 #10
0
ファイル: list_plugin_repos.go プロジェクト: Reejoshi/cli
func init() {
	commandregistry.Register(&ListPluginRepos{})
}
コード例 #11
0
func init() {
	commandregistry.Register(&unbindFromStagingGroup{})
}
コード例 #12
0
ファイル: update_buildpack.go プロジェクト: yingkitw/cli
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
ファイル: bind_service.go プロジェクト: yingkitw/cli
func init() {
	commandregistry.Register(&BindService{})
}
コード例 #16
0
ファイル: orgs.go プロジェクト: Reejoshi/cli
func init() {
	commandregistry.Register(&ListOrgs{})
}
コード例 #17
0
ファイル: unset_space_role.go プロジェクト: Reejoshi/cli
func init() {
	commandregistry.Register(&UnsetSpaceRole{})
}
コード例 #18
0
ファイル: set_health_check.go プロジェクト: Reejoshi/cli
func init() {
	commandregistry.Register(&SetHealthCheck{})
}
コード例 #19
0
ファイル: delete_route.go プロジェクト: Reejoshi/cli
func init() {
	commandregistry.Register(&DeleteRoute{})
}
コード例 #20
0
ファイル: rename_service_broker.go プロジェクト: Reejoshi/cli
func init() {
	commandregistry.Register(&RenameServiceBroker{})
}
コード例 #21
0
ファイル: uninstall_plugin.go プロジェクト: jsloyer/cli
func init() {
	commandregistry.Register(&PluginUninstall{})
}
コード例 #22
0
ファイル: ssh_enabled.go プロジェクト: jasonkeene/cli
func init() {
	commandregistry.Register(&SSHEnabled{})
}
コード例 #23
0
ファイル: create_org.go プロジェクト: yingkitw/cli
func init() {
	commandregistry.Register(&CreateOrg{})
}
コード例 #24
0
ファイル: create_domain.go プロジェクト: jasonkeene/cli
func init() {
	commandregistry.Register(&CreateDomain{})
}
コード例 #25
0
ファイル: oauth_token.go プロジェクト: yingkitw/cli
func init() {
	commandregistry.Register(&OAuthToken{})
}
コード例 #26
0
ファイル: map_route_test.go プロジェクト: jasonkeene/cli
	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
ファイル: allow_space_ssh.go プロジェクト: yingkitw/cli
func init() {
	commandregistry.Register(&AllowSpaceSSH{})
}
コード例 #30
0
ファイル: delete_user.go プロジェクト: jasonkeene/cli
func init() {
	commandregistry.Register(&DeleteUser{})
}