本文整理汇总了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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}