本文整理匯總了Golang中github.com/nttlabs/cli/testhelpers/configuration.NewRepositoryWithDefaults函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewRepositoryWithDefaults函數的具體用法?Golang NewRepositoryWithDefaults怎麽用?Golang NewRepositoryWithDefaults使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了NewRepositoryWithDefaults函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: TestSecurityGroupSpaces
func TestSecurityGroupSpaces(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "SecurityGroupSpaces Suite")
}
示例2: callUnsetSpaceRole
func callUnsetSpaceRole(args []string, spaceRepo *testapi.FakeSpaceRepository, userRepo *testapi.FakeUserRepository, requirementsFactory *testreq.FakeReqFactory) (ui *testterm.FakeUI) {
ui = &testterm.FakeUI{}
config := testconfig.NewRepositoryWithDefaults()
cmd := NewUnsetSpaceRole(ui, config, spaceRepo, userRepo)
testcmd.RunCommand(cmd, args, requirementsFactory)
return
}
示例3: TestEnvironmentVariableGroups
func TestEnvironmentVariableGroups(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "EnvironmentVariableGroups Suite")
}
示例4: 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
}
示例5: TestCopyApplicationSource
func TestCopyApplicationSource(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "CopyApplicationSource Suite")
}
示例6: callSetOrgRole
func callSetOrgRole(args []string, requirementsFactory *testreq.FakeReqFactory, userRepo *testapi.FakeUserRepository) (ui *testterm.FakeUI) {
ui = new(testterm.FakeUI)
config := testconfig.NewRepositoryWithDefaults()
cmd := NewSetOrgRole(ui, config, userRepo)
testcmd.RunCommand(cmd, args, requirementsFactory)
return
}
示例7: TestStaging
func TestStaging(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "Staging Suite")
}
示例8: createServiceBrokerRepo
func createServiceBrokerRepo(requests ...testnet.TestRequest) (ts *httptest.Server, handler *testnet.TestHandler, repo ServiceBrokerRepository) {
ts, handler = testnet.NewServer(requests)
configRepo := testconfig.NewRepositoryWithDefaults()
configRepo.SetApiEndpoint(ts.URL)
gateway := net.NewCloudControllerGateway(configRepo, time.Now, &testterm.FakeUI{})
repo = NewCloudControllerServiceBrokerRepository(configRepo, gateway)
return
}
示例9: createUserProvidedServiceInstanceRepo
func createUserProvidedServiceInstanceRepo(req testnet.TestRequest) (ts *httptest.Server, handler *testnet.TestHandler, repo UserProvidedServiceInstanceRepository) {
ts, handler = testnet.NewServer([]testnet.TestRequest{req})
configRepo := testconfig.NewRepositoryWithDefaults()
configRepo.SetApiEndpoint(ts.URL)
gateway := net.NewCloudControllerGateway(configRepo, time.Now, &testterm.FakeUI{})
repo = NewCCUserProvidedServiceInstanceRepository(configRepo, gateway)
return
}
示例10: 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
}
示例11: createPasswordRepo
func createPasswordRepo(req testnet.TestRequest) (passwordServer *httptest.Server, handler *testnet.TestHandler, repo PasswordRepository) {
passwordServer, handler = testnet.NewServer([]testnet.TestRequest{req})
configRepo := testconfig.NewRepositoryWithDefaults()
configRepo.SetUaaEndpoint(passwordServer.URL)
gateway := net.NewCloudControllerGateway(configRepo, time.Now, &testterm.FakeUI{})
repo = NewCloudControllerPasswordRepository(configRepo, gateway)
return
}
示例12: createOrganizationRepo
func createOrganizationRepo(reqs ...testnet.TestRequest) (testserver *httptest.Server, handler *testnet.TestHandler, repo OrganizationRepository) {
testserver, handler = testnet.NewServer(reqs)
configRepo := testconfig.NewRepositoryWithDefaults()
configRepo.SetApiEndpoint(testserver.URL)
gateway := net.NewCloudControllerGateway(configRepo, time.Now, &testterm.FakeUI{})
repo = NewCloudControllerOrganizationRepository(configRepo, gateway)
return
}
示例13: callBindService
func callBindService(args []string, requirementsFactory *testreq.FakeReqFactory, serviceBindingRepo api.ServiceBindingRepository) (fakeUI *testterm.FakeUI) {
fakeUI = new(testterm.FakeUI)
config := testconfig.NewRepositoryWithDefaults()
cmd := NewBindService(fakeUI, config, serviceBindingRepo)
testcmd.RunCommand(cmd, args, requirementsFactory)
return
}
示例14: TestApp
func TestApp(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "fixtures", "plugins"), "test_1")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "fixtures", "plugins"), "test_2")
RunSpecs(t, "App Suite")
}
示例15: callListServiceAuthTokens
func callListServiceAuthTokens(requirementsFactory *testreq.FakeReqFactory, authTokenRepo *testapi.FakeAuthTokenRepo) (ui *testterm.FakeUI) {
ui = &testterm.FakeUI{}
config := testconfig.NewRepositoryWithDefaults()
cmd := NewListServiceAuthTokens(ui, config, authTokenRepo)
testcmd.RunCommand(cmd, []string{}, requirementsFactory)
return
}