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


Golang configuration.NewRepositoryWithDefaults函數代碼示例

本文整理匯總了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")
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:suite_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:unset_space_role_test.go

示例3: TestEnvironmentVariableGroups

func TestEnvironmentVariableGroups(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "EnvironmentVariableGroups Suite")
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:environment_variable_groups_suite_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:delete_orphaned_routes_test.go

示例5: TestCopyApplicationSource

func TestCopyApplicationSource(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "CopyApplicationSource Suite")
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:copy_application_source_suite_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:set_org_role_test.go

示例7: TestStaging

func TestStaging(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "Staging Suite")
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:staging_suite_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:service_brokers_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:user_provided_service_instances_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:service_brokers_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:password_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:organizations_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:bind_service_test.go

示例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")
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:app_suite_test.go

示例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
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:10,代碼來源:service_auth_tokens_test.go


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