當前位置: 首頁>>代碼示例>>Golang>>正文


Golang commands.RunCommand函數代碼示例

本文整理匯總了Golang中github.com/cloudfoundry/cli/testhelpers/commands.RunCommand函數的典型用法代碼示例。如果您正苦於以下問題:Golang RunCommand函數的具體用法?Golang RunCommand怎麽用?Golang RunCommand使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了RunCommand函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: callUnsetSpaceRole

func callUnsetSpaceRole(args []string, spaceRepo *testapi.FakeSpaceRepository, userRepo *testapi.FakeUserRepository, requirementsFactory *testreq.FakeReqFactory) (*testterm.FakeUI, bool) {
	ui := &testterm.FakeUI{}
	config := testconfig.NewRepositoryWithDefaults()
	cmd := NewUnsetSpaceRole(ui, config, spaceRepo, userRepo)
	passed := testcmd.RunCommand(cmd, args, requirementsFactory)
	return ui, passed
}
開發者ID:tools-alexuser01,項目名稱:cli,代碼行數:7,代碼來源:unset_space_role_test.go

示例2: callCreateServiceBroker

func callCreateServiceBroker(args []string, requirementsFactory *testreq.FakeReqFactory, serviceBrokerRepo *testapi.FakeServiceBrokerRepo) (ui *testterm.FakeUI) {
	ui = &testterm.FakeUI{}
	config := testconfig.NewRepositoryWithDefaults()
	cmd := NewCreateServiceBroker(ui, config, serviceBrokerRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:palakmathur,項目名稱:cli,代碼行數:7,代碼來源:create_service_broker_test.go

示例3: callStop

func callStop(args []string, requirementsFactory *testreq.FakeReqFactory, appRepo api.ApplicationRepository) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)
	configRepo := testconfig.NewRepositoryWithDefaults()
	cmd := NewStop(ui, configRepo, appRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:GABONIA,項目名稱:cli,代碼行數:7,代碼來源:stop_test.go

示例4: callRestart

func callRestart(args []string, requirementsFactory *testreq.FakeReqFactory, starter ApplicationStarter, stopper ApplicationStopper) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)

	cmd := NewRestart(ui, starter, stopper)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:nandrah,項目名稱:cli,代碼行數:7,代碼來源:restart_test.go

示例5: callPassword

func callPassword(inputs []string, deps passwordDeps) (ui *testterm.FakeUI) {
	ui = &testterm.FakeUI{Inputs: inputs}
	cmd := NewPassword(ui, deps.PwdRepo, deps.Config)
	testcmd.RunCommand(cmd, []string{}, deps.ReqFactory)

	return
}
開發者ID:hail100,項目名稱:cli,代碼行數:7,代碼來源:passwd_test.go

示例6: callUpdateServiceAuthToken

func callUpdateServiceAuthToken(args []string, requirementsFactory *testreq.FakeReqFactory, authTokenRepo *testapi.FakeAuthTokenRepo) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)
	config := testconfig.NewRepositoryWithDefaults()
	cmd := NewUpdateServiceAuthToken(ui, config, authTokenRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:palakmathur,項目名稱:cli,代碼行數:7,代碼來源:update_service_auth_token_test.go

示例7: callDeleteOrphanedRoutes

func callDeleteOrphanedRoutes(confirmation string, args []string, reqFactory *testreq.FakeReqFactory, routeRepo *testapi.FakeRouteRepository) (ui *testterm.FakeUI) {
	ui = &testterm.FakeUI{Inputs: []string{confirmation}}
	configRepo := testconfig.NewRepositoryWithDefaults()
	cmd := NewDeleteOrphanedRoutes(ui, configRepo, routeRepo)
	testcmd.RunCommand(cmd, args, reqFactory)
	return
}
開發者ID:GABONIA,項目名稱:cli,代碼行數:7,代碼來源:delete_orphaned_routes_test.go

示例8: callShowSpace

func callShowSpace(args []string, requirementsFactory *testreq.FakeReqFactory) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)
	config := testconfig.NewRepositoryWithDefaults()
	cmd := NewShowSpace(ui, config)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:palakmathur,項目名稱:cli,代碼行數:7,代碼來源:space_test.go

示例9: callShareDomain

func callShareDomain(args []string, requirementsFactory *testreq.FakeReqFactory, domainRepo *testapi.FakeDomainRepository) (fakeUI *testterm.FakeUI) {
	fakeUI = new(testterm.FakeUI)
	configRepo := testconfig.NewRepositoryWithAccessToken(configuration.TokenInfo{Username: "my-user"})
	cmd := NewCreateSharedDomain(fakeUI, configRepo, domainRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:GABONIA,項目名稱:cli,代碼行數:7,代碼來源:create_shared_domain_test.go

示例10: callOrgUsers

func callOrgUsers(args []string, requirementsFactory *testreq.FakeReqFactory, userRepo *testapi.FakeUserRepository) (ui *testterm.FakeUI) {
	ui = &testterm.FakeUI{}
	config := testconfig.NewRepositoryWithDefaults()
	cmd := NewOrgUsers(ui, config, userRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:palakmathur,項目名稱:cli,代碼行數:7,代碼來源:org_users_test.go

示例11: callMapRoute

func callMapRoute(args []string, requirementsFactory *testreq.FakeReqFactory, routeRepo *testapi.FakeRouteRepository, createRoute *testcmd.FakeRouteCreator) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)
	configRepo := testconfig.NewRepositoryWithDefaults()
	cmd := NewMapRoute(ui, configRepo, routeRepo, createRoute)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:palakmathur,項目名稱:cli,代碼行數:7,代碼來源:map_route_test.go

示例12: callUpdateUserProvidedService

func callUpdateUserProvidedService(args []string, requirementsFactory *testreq.FakeReqFactory, userProvidedServiceInstanceRepo api.UserProvidedServiceInstanceRepository) (fakeUI *testterm.FakeUI) {
	fakeUI = &testterm.FakeUI{}
	config := testconfig.NewRepositoryWithDefaults()

	cmd := NewUpdateUserProvidedService(fakeUI, config, userProvidedServiceInstanceRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:palakmathur,項目名稱:cli,代碼行數:8,代碼來源:update_user_provided_service_test.go

示例13: callListServiceBrokers

func callListServiceBrokers(args []string, serviceBrokerRepo *testapi.FakeServiceBrokerRepo) (ui *testterm.FakeUI) {
	ui = &testterm.FakeUI{}
	config := testconfig.NewRepositoryWithDefaults()
	cmd := NewListServiceBrokers(ui, config, serviceBrokerRepo)
	testcmd.RunCommand(cmd, args, &testreq.FakeReqFactory{})

	return
}
開發者ID:BlueSpice,項目名稱:cli,代碼行數:8,代碼來源:service_brokers_test.go

示例14: callApi

func callApi(args []string, config configuration.ReadWriter, endpointRepo *testapi.FakeEndpointRepo) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)

	cmd := NewApi(ui, config, endpointRepo)
	requirementsFactory := &testreq.FakeReqFactory{}
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:GABONIA,項目名稱:cli,代碼行數:8,代碼來源:api_test.go

示例15: callUpdateBuildpack

func callUpdateBuildpack(args []string, requirementsFactory *testreq.FakeReqFactory, fakeRepo *testapi.FakeBuildpackRepository,
	fakeBitsRepo *testapi.FakeBuildpackBitsRepository) (ui *testterm.FakeUI) {
	ui = new(testterm.FakeUI)

	cmd := NewUpdateBuildpack(ui, fakeRepo, fakeBitsRepo)
	testcmd.RunCommand(cmd, args, requirementsFactory)
	return
}
開發者ID:GABONIA,項目名稱:cli,代碼行數:8,代碼來源:update_buildpack_test.go


注:本文中的github.com/cloudfoundry/cli/testhelpers/commands.RunCommand函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。