• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang generator.RandomName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/cloudfoundry-incubator/cf-test-helpers/generator.RandomName函数的典型用法代码示例。如果您正苦于以下问题:Golang RandomName函数的具体用法?Golang RandomName怎么用?Golang RandomName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了RandomName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: newCfApp

func newCfApp(appNamePrefix string, maxFailedCurls int) *cfApp {
	appName := appNamePrefix + "-" + generator.RandomName()
	rawUrl := fmt.Sprintf(AppRoutePattern, appName, config.OverrideDomain)
	appUrl, err := url.Parse(rawUrl)
	if err != nil {
		panic(err)
	}
	return &cfApp{
		appName:        appName,
		appRoute:       *appUrl,
		orgName:        "org-" + generator.RandomName(),
		spaceName:      "space-" + generator.RandomName(),
		maxFailedCurls: maxFailedCurls,
	}
}
开发者ID:cloudfoundry,项目名称:diego-upgrade-stability-tests,代码行数:15,代码来源:helpers_test.go


示例2: AuthenticateUser

func AuthenticateUser(authorizationEndpoint string, username string, password string) (cookie string) {
	loginCsrfUri := fmt.Sprintf("%v/login", authorizationEndpoint)

	cookieFile, err := ioutil.TempFile("", "cats-csrf-cookie"+generator.RandomName())
	Expect(err).ToNot(HaveOccurred())
	cookiePath := cookieFile.Name()
	defer func() {
		cookieFile.Close()
		os.Remove(cookiePath)
	}()

	curl := runner.Curl(loginCsrfUri, `--insecure`, `-i`, `-v`, `-c`, cookiePath).Wait(DEFAULT_TIMEOUT)
	apiResponse := string(curl.Out.Contents())
	csrfRegEx, _ := regexp.Compile(`name="X-Uaa-Csrf" value="(.*)"`)
	csrfToken := csrfRegEx.FindStringSubmatch(apiResponse)[1]

	loginUri := fmt.Sprintf("%v/login.do", authorizationEndpoint)
	usernameEncoded := url.QueryEscape(username)
	passwordEncoded := url.QueryEscape(password)
	csrfTokenEncoded := url.QueryEscape(csrfToken)
	loginCredentials := fmt.Sprintf("username=%v&password=%v&X-Uaa-Csrf=%v", usernameEncoded, passwordEncoded, csrfTokenEncoded)

	curl = runner.Curl(loginUri, `--data`, loginCredentials, `--insecure`, `-i`, `-v`, `-b`, cookiePath).Wait(DEFAULT_TIMEOUT)
	Expect(curl).To(Exit(0))
	apiResponse = string(curl.Out.Contents())

	jsessionRegEx, _ := regexp.Compile(`JSESSIONID([^;]*)`)
	vcapidRegEx, _ := regexp.Compile(`__VCAP_ID__([^;]*)`)
	sessionId := jsessionRegEx.FindString(apiResponse)
	vcapId := vcapidRegEx.FindString(apiResponse)
	cookie = fmt.Sprintf("%v;%v", sessionId, vcapId)
	return
}
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:33,代码来源:sso.go


示例3: TestApplications

func TestApplications(t *testing.T) {
	RegisterFailHandler(Fail)

	SetDefaultEventuallyTimeout(time.Minute)
	SetDefaultEventuallyPollingInterval(time.Second)

	config := helpers.LoadConfig()
	context = helpers.NewContext(config)
	environment := helpers.NewEnvironment(context)

	BeforeSuite(func() {
		environment.Setup()
	})

	AfterSuite(func() {
		environment.Teardown()
	})

	BeforeEach(func() {
		appName = generator.RandomName()
	})

	componentName := "Diego"

	rs := []Reporter{}

	if config.ArtifactsDirectory != "" {
		helpers.EnableCFTrace(config, componentName)
		rs = append(rs, helpers.NewJUnitReporter(config, componentName))
	}

	RunSpecsWithDefaultAndCustomReporters(t, componentName, rs)
}
开发者ID:jjewett-pcf,项目名称:wats,代码行数:33,代码来源:diego_suite_test.go


示例4: testThatDrainIsReachable

func testThatDrainIsReachable(syslogDrainAddress string, drainListener *syslogDrainListener) {
	conn, err := net.Dial("tcp", syslogDrainAddress)
	Expect(err).ToNot(HaveOccurred())
	defer conn.Close()

	randomMessage := "random-message-" + generator.RandomName()
	_, err = conn.Write([]byte(randomMessage))
	Expect(err).ToNot(HaveOccurred())

	Eventually(func() bool {
		return drainListener.DidReceive(randomMessage)
	}).Should(BeTrue())
}
开发者ID:vito,项目名称:cf-acceptance-tests,代码行数:13,代码来源:syslog_drain_test.go


示例5: NewServiceBroker

func NewServiceBroker(name string, path string, context helpers.SuiteContext) ServiceBroker {
	b := ServiceBroker{}
	b.Path = path
	b.Name = name
	b.Service.Name = generator.RandomName()
	b.Service.ID = generator.RandomName()
	b.Plan.Name = generator.RandomName()
	b.Plan.ID = generator.RandomName()
	b.Service.DashboardClient.ID = generator.RandomName()
	b.Service.DashboardClient.Secret = generator.RandomName()
	b.Service.DashboardClient.RedirectUri = generator.RandomName()
	b.context = context
	return b
}
开发者ID:naohiko,项目名称:cf-acceptance-tests,代码行数:14,代码来源:broker.go


示例6: NewServiceBroker

func NewServiceBroker(name string, path string, context helpers.SuiteContext, includeSSOClient bool) ServiceBroker {
	b := ServiceBroker{}
	b.Path = path
	b.Name = name
	b.Service.Name = generator.RandomName()
	b.Service.ID = generator.RandomName()
	b.SyncPlans = []Plan{
		{Name: generator.RandomName(), ID: generator.RandomName()},
		{Name: generator.RandomName(), ID: generator.RandomName()},
	}
	b.AsyncPlans = []Plan{
		{Name: generator.RandomName(), ID: generator.RandomName()},
		{Name: generator.RandomName(), ID: generator.RandomName()},
	}
	b.SsoPlans = []Plan{
		{
			Name: generator.RandomName(), ID: generator.RandomName(), DashboardClient: DashboardClient{
				ID:     generator.RandomName(),
				Secret: generator.RandomName(),
			},
		},
	}
	if includeSSOClient {
		b.Service.DashboardClient.Key = "dashboard_client"
	} else {
		b.Service.DashboardClient.Key = "dashboard_client-deactivated"
	}

	b.Service.DashboardClient.ID = generator.RandomName()
	b.Service.DashboardClient.Secret = generator.RandomName()
	b.Service.DashboardClient.RedirectUri = generator.RandomName()
	b.context = context
	return b
}
开发者ID:naheedmk,项目名称:cf-acceptance-tests,代码行数:34,代码来源:broker.go


示例7:

	"github.com/cloudfoundry-incubator/cf-test-helpers/generator"
	"github.com/cloudfoundry-incubator/cf-test-helpers/helpers"
	"github.com/cloudfoundry/cf-acceptance-tests/helpers/assets"
	. "github.com/cloudfoundry/cf-acceptance-tests/helpers/services"
)

var _ = Describe("Service Broker Lifecycle", func() {
	var broker ServiceBroker
	Describe("public brokers", func() {
		var acls *Session
		var output []byte
		var oldServiceName string
		var oldPlanName string

		BeforeEach(func() {
			broker = NewServiceBroker(generator.RandomName(), assets.NewAssets().ServiceBroker, context, false)
			cf.TargetSpace(context.RegularUserContext(), context.ShortTimeout())
			broker.Push()
			broker.Configure()

			cf.AsUser(context.AdminUserContext(), context.ShortTimeout(), func() {
				broker.Create()
			})
		})

		Describe("Updating the catalog", func() {

			BeforeEach(func() {
				broker.PublicizePlans()
			})
开发者ID:naheedmk,项目名称:cf-acceptance-tests,代码行数:30,代码来源:service_broker_lifecycle_test.go


示例8:

		}, ASYNC_OPERATION_TIMEOUT, ASYNC_OPERATION_POLL_INTERVAL).Should(Say("not found"))
	}

	waitForAsyncOperationToComplete := func(broker ServiceBroker, instanceName string) {
		Eventually(func() *Session {
			serviceDetails := cf.Cf("service", instanceName).Wait(DEFAULT_TIMEOUT)
			Expect(serviceDetails).To(Exit(0), "failed getting service instance details")
			return serviceDetails
		}, ASYNC_OPERATION_TIMEOUT, ASYNC_OPERATION_POLL_INTERVAL).Should(Say("succeeded"))
	}

	type Params struct{ Param1 string }

	Context("Synchronous operations", func() {
		BeforeEach(func() {
			broker = NewServiceBroker(generator.RandomName(), assets.NewAssets().ServiceBroker, context, true)
			broker.Push()
			broker.Configure()
			broker.Create()
			broker.PublicizePlans()
		})

		AfterEach(func() {
			broker.Destroy()
		})

		Context("just service instances", func() {
			It("can create a service instance", func() {
				tags := "['tag1', 'tag2']"
				type Params struct{ Param1 string }
				params, _ := json.Marshal(Params{Param1: "value"})
开发者ID:naheedmk,项目名称:cf-acceptance-tests,代码行数:31,代码来源:service_instance_lifecycle_test.go


示例9: TestTurbulence

	"testing"
)

func TestTurbulence(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Turbulence Suite")
}

var (
	goPath             string
	config             helpers.Config
	bosh               *helpers.Bosh
	turbulenceManifest *helpers.Manifest

	etcdRelease          = fmt.Sprintf("etcd-%s", generator.RandomName())
	etcdDeployment       = etcdRelease
	turbulenceDeployment = fmt.Sprintf("turb-%s", generator.RandomName())

	directorUUIDStub, etcdNameOverrideStub, turbulenceNameOverrideStub string

	turbulenceManifestGeneration string
	etcdManifestGeneration       string
)

var _ = BeforeSuite(func() {
	goPath = helpers.SetupGoPath()
	gemfilePath := helpers.SetupFastBosh()
	config = helpers.LoadConfig()
	boshOperationTimeout := helpers.GetBoshOperationTimeout(config)
	bosh = helpers.NewBosh(gemfilePath, goPath, config.BoshTarget, boshOperationTimeout)
开发者ID:digideskweb,项目名称:etcd-release,代码行数:30,代码来源:turbulence_suite_test.go


示例10:

				appLogsSession := cf.Cf("logs", "--recent", appName)
				Expect(appLogsSession.Wait(DEFAULT_TIMEOUT)).To(Exit(0))
				return appLogsSession
			}, DEFAULT_TIMEOUT).Should(Say("Muahaha"))
		})
	})

	Context("firehose data", func() {
		It("shows logs and metrics", func() {
			config := helpers.LoadConfig()

			noaaConnection := noaa.NewConsumer(getDopplerEndpoint(), &tls.Config{InsecureSkipVerify: config.SkipSSLValidation}, nil)
			msgChan := make(chan *events.Envelope, 100000)
			errorChan := make(chan error)
			stopchan := make(chan struct{})
			go noaaConnection.Firehose(generator.RandomName(), getAdminUserAccessToken(), msgChan, errorChan, stopchan)
			defer close(stopchan)

			Eventually(func() string {
				return helpers.CurlApp(appName, fmt.Sprintf("/log/sleep/%d", hundredthOfOneSecond))
			}, DEFAULT_TIMEOUT).Should(ContainSubstring("Muahaha"))

			timeout := time.After(5 * time.Second)
			messages := make([]*events.Envelope, 0, 100000)

			for {
				select {
				case <-timeout:
					return
				case msg := <-msgChan:
					messages = append(messages, msg)
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:31,代码来源:loggregator_test.go


示例11:

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	. "github.com/onsi/gomega/gbytes"
	. "github.com/onsi/gomega/gexec"

	"github.com/cloudfoundry-incubator/cf-test-helpers/cf"
	"github.com/cloudfoundry-incubator/cf-test-helpers/generator"
	"github.com/cloudfoundry/cf-acceptance-tests/helpers"
	shelpers "github.com/cloudfoundry/cf-acceptance-tests/services/helpers"
)

var _ = Describe("Purging service offerings", func() {
	var broker shelpers.ServiceBroker

	BeforeEach(func() {
		broker = shelpers.NewServiceBroker(generator.RandomName(), helpers.NewAssets().ServiceBroker, context)
		broker.Push()
		broker.Configure()
		broker.Create()
		broker.PublicizePlans()
	})

	AfterEach(func() {
		broker.Destroy()
	})

	It("removes all instances and plans of the service, then removes the service offering", func() {
		instanceName := "purge-offering-instance"

		marketplace := cf.Cf("marketplace").Wait(DEFAULT_TIMEOUT)
		Expect(marketplace).To(Exit(0))
开发者ID:naohiko,项目名称:cf-acceptance-tests,代码行数:31,代码来源:purge_service_offering_test.go


示例12:

	})

	It("Applies correct environment variables while running apps", func() {
		cf.AsUser(context.AdminUserContext(), DEFAULT_TIMEOUT, func() {
			Expect(cf.Cf("set-running-environment-variable-group", `{"CATS_RUNNING_TEST_VAR":"running_env_value"}`).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
		})

		Expect(cf.Cf("push", appName, "-m", "128M", "-p", assets.NewAssets().Dora, "-d", config.AppsDomain).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))

		env := helpers.CurlApp(appName, "/env")

		Expect(env).To(ContainSubstring("running_env_value"))
	})

	It("Applies environment variables while staging apps", func() {
		buildpackName = generator.RandomName()
		buildpackZip := createBuildpack()

		cf.AsUser(context.AdminUserContext(), DEFAULT_TIMEOUT, func() {
			Expect(cf.Cf("set-staging-environment-variable-group", `{"CATS_STAGING_TEST_VAR":"staging_env_value"}`).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
			Expect(cf.Cf("create-buildpack", buildpackName, buildpackZip, "999").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
		})

		Expect(cf.Cf("push", appName, "-m", "128M", "-b", buildpackName, "-p", assets.NewAssets().HelloWorld, "-d", config.AppsDomain).Wait(CF_PUSH_TIMEOUT)).To(Exit(1))

		Eventually(func() *Session {
			appLogsSession := cf.Cf("logs", "--recent", appName)
			Expect(appLogsSession.Wait(DEFAULT_TIMEOUT)).To(Exit(0))
			return appLogsSession
		}, DEFAULT_TIMEOUT).Should(Say("staging_env_value"))
	})
开发者ID:JordanICollier,项目名称:cf-acceptance-tests,代码行数:31,代码来源:environment_variables_group_test.go


示例13:

		app_helpers.SetBackend(appName)
		Expect(cf.Cf("start", appName).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
		Eventually(func() string {
			return helpers.CurlAppRoot(appName)
		}, DEFAULT_TIMEOUT).Should(ContainSubstring("Hi, I'm Dora!"))
	})

	AfterEach(func() {
		app_helpers.AppReport(appName, DEFAULT_TIMEOUT)

		Expect(cf.Cf("delete", appName, "-f", "-r").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
	})

	Describe("Removing the route", func() {
		It("Should be  able to remove and delete the route", func() {
			secondHost := generator.RandomName()

			By("adding a route")
			Eventually(cf.Cf("map-route", appName, helpers.LoadConfig().AppsDomain, "-n", secondHost), DEFAULT_TIMEOUT).Should(Exit(0))
			Eventually(helpers.CurlingAppRoot(appName), DEFAULT_TIMEOUT).Should(ContainSubstring("Hi, I'm Dora!"))
			Eventually(helpers.CurlingAppRoot(secondHost), DEFAULT_TIMEOUT).Should(ContainSubstring("Hi, I'm Dora!"))

			By("removing a route")
			Eventually(cf.Cf("unmap-route", appName, helpers.LoadConfig().AppsDomain, "-n", secondHost), DEFAULT_TIMEOUT).Should(Exit(0))
			Eventually(helpers.CurlingAppRoot(secondHost), DEFAULT_TIMEOUT).Should(ContainSubstring("404"))
			Eventually(helpers.CurlingAppRoot(appName), DEFAULT_TIMEOUT).Should(ContainSubstring("Hi, I'm Dora!"))

			By("deleting the original route")
			Expect(cf.Cf("delete-route", helpers.LoadConfig().AppsDomain, "-n", appName, "-f").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
			Eventually(helpers.CurlingAppRoot(appName), DEFAULT_TIMEOUT).Should(ContainSubstring("404"))
		})
开发者ID:cf-routing,项目名称:cf-acceptance-tests,代码行数:31,代码来源:delete_route_test.go


示例14: TestDeploy

func TestDeploy(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Deploy Suite")
}

var (
	goPath string
	config helpers.Config

	bosh *helpers.Bosh

	consulManifestGeneration string

	directorUUIDStub string

	consulRelease          = fmt.Sprintf("consul-%s", generator.RandomName())
	consulDeployment       = consulRelease
	consulNameOverrideStub string
)

var _ = BeforeSuite(func() {
	goPath = helpers.SetupGoPath()
	gemfilePath := helpers.SetupFastBosh()
	config = helpers.LoadConfig()
	boshOperationTimeout := helpers.GetBoshOperationTimeout(config)
	bosh = helpers.NewBosh(gemfilePath, goPath, config.BoshTarget, boshOperationTimeout)

	consulManifestGeneration = filepath.Join(goPath, "src", "acceptance-tests", "scripts", "generate-consul-deployment-manifest")

	err := os.Chdir(goPath)
	Expect(err).ToNot(HaveOccurred())
开发者ID:keymon,项目名称:consul-release,代码行数:31,代码来源:deploy_suite_test.go


示例15:

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	. "github.com/onsi/gomega/gbytes"
	. "github.com/onsi/gomega/gexec"

	"github.com/cloudfoundry-incubator/cf-test-helpers/cf"
	"github.com/cloudfoundry-incubator/cf-test-helpers/generator"
	"github.com/cloudfoundry/cf-acceptance-tests/helpers/assets"
	. "github.com/cloudfoundry/cf-acceptance-tests/helpers/services"
)

var _ = Describe("Purging service offerings", func() {
	var broker ServiceBroker

	BeforeEach(func() {
		broker = NewServiceBroker(generator.RandomName(), assets.NewAssets().ServiceBroker, context)
		broker.Push()
		broker.Configure()
		cf.AsUser(context.AdminUserContext(), DEFAULT_TIMEOUT, func() {
			broker.Create()
			broker.PublicizePlans()
		})
	})

	AfterEach(func() {
		broker.Destroy()
	})

	Context("when there are several existing service entities", func() {
		var appName, instanceName string
开发者ID:zwx292872,项目名称:cf-acceptance-tests,代码行数:30,代码来源:purge_service_offering_test.go


示例16:

	"github.com/cloudfoundry-incubator/cf-test-helpers/generator"
	"github.com/cloudfoundry-incubator/cf-test-helpers/helpers"
	"github.com/cloudfoundry-incubator/diego-acceptance-tests/helpers/assets"
)

var _ = Describe("Security Groups", func() {
	type DoraCurlResponse struct {
		Stdout     string
		Stderr     string
		ReturnCode int `json:"return_code"`
	}

	var appName string

	BeforeEach(func() {
		appName = generator.RandomName()
	})

	AfterEach(func() {
		Eventually(cf.Cf("logs", appName, "--recent")).Should(Exit())
		Eventually(cf.Cf("delete", appName, "-f")).Should(Exit(0))
	})

	// this test assumes the default running security groups block access to the DEAs
	// the test takes advantage of the fact that the DEA ip address and internal container ip address
	//  are discoverable via the cc api and dora's myip endpoint
	It("allows traffic and then blocks traffic", func() {
		By("pushing it")
		Eventually(cf.Cf("push", appName, "-p", assets.NewAssets().Dora, "--no-start", "-b", "ruby_buildpack"), CF_PUSH_TIMEOUT).Should(Exit(0))

		By("staging and running it on Diego")
开发者ID:axelaris,项目名称:diego-acceptance-tests,代码行数:31,代码来源:security_group_test.go


示例17: TestTurbulence

	"testing"
)

func TestTurbulence(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Turbulence Suite")
}

var (
	goPath             string
	config             helpers.Config
	bosh               *helpers.Bosh
	turbulenceManifest *helpers.Manifest

	consulRelease    = fmt.Sprintf("consul-%s", generator.RandomName())
	consulDeployment = consulRelease

	turbulenceDeployment = fmt.Sprintf("turb-%s", generator.RandomName())

	directorUUIDStub, consulNameOverrideStub, turbulenceNameOverrideStub string

	turbulenceManifestGeneration string
	consulManifestGeneration     string
)

var _ = BeforeSuite(func() {
	goPath = helpers.SetupGoPath()
	gemfilePath := helpers.SetupFastBosh()
	config = helpers.LoadConfig()
	boshOperationTimeout := helpers.GetBoshOperationTimeout(config)
开发者ID:keymon,项目名称:consul-release,代码行数:30,代码来源:turbulence_suite_test.go


示例18:

	. "github.com/onsi/gomega"

	"github.com/cloudfoundry-incubator/cf-test-helpers/generator"
	"github.com/cloudfoundry/cf-acceptance-tests/helpers"
	shelpers "github.com/cloudfoundry/cf-acceptance-tests/services/helpers"
)

var _ = Describe("SSO Lifecycle", func() {
	var broker shelpers.ServiceBroker
	var config shelpers.OAuthConfig
	var apiEndpoint = helpers.LoadConfig().ApiEndpoint

	redirectUri := `http://example.com`

	BeforeEach(func() {
		broker = shelpers.NewServiceBroker(generator.RandomName(), helpers.NewAssets().ServiceBroker, context)
		broker.Push()
		broker.Service.DashboardClient.RedirectUri = redirectUri
		broker.Configure()

		config = shelpers.OAuthConfig{}
		config.ClientId = broker.Service.DashboardClient.ID
		config.ClientSecret = broker.Service.DashboardClient.Secret
		config.RedirectUri = redirectUri
		config.RequestedScopes = `openid,cloud_controller_service_permissions.read`

		shelpers.SetOauthEndpoints(apiEndpoint, &config)
	})

	AfterEach(func() {
		broker.Destroy()
开发者ID:naohiko,项目名称:cf-acceptance-tests,代码行数:31,代码来源:sso_lifecycle_test.go


示例19:

	BeforeEach(func() {
		Expect(helpers.TestConfig.MysqlNodes).NotTo(BeNil())
		Expect(len(helpers.TestConfig.MysqlNodes)).To(BeNumerically(">=", 1))

		Expect(helpers.TestConfig.Brokers).NotTo(BeNil())
		Expect(len(helpers.TestConfig.Brokers)).To(BeNumerically(">=", 2))

		broker0SshTunnel = helpers.TestConfig.Brokers[0].SshTunnel
		broker1SshTunnel = helpers.TestConfig.Brokers[1].SshTunnel

		// Remove broker partitions in case previous test did not cleanup correctly
		partition.Off(broker0SshTunnel)
		partition.Off(broker1SshTunnel)

		appName = generator.RandomName()

		By("Push an app", func() {
			runner.NewCmdRunner(Cf("push", appName, "-m", "256M", "-p", sinatraPath, "-b", "ruby_buildpack", "-no-start"), helpers.TestContext.LongTimeout()).Run()
		})
	})

	AfterEach(func() {
		partition.Off(broker0SshTunnel)
		partition.Off(broker1SshTunnel)
		// TODO: Reintroduce the mariadb node once #81974864 is complete.
		// partition.Off(IntegrationConfig.MysqlNodes[0].SshTunnel)
	})

	It("write/read data before and after a partition of mysql node and then broker", func() {
		instanceCount := 3
开发者ID:pcfdev-forks,项目名称:cf-mysql-acceptance-tests,代码行数:30,代码来源:failover_test.go


示例20:

	"github.com/cloudfoundry/cf-acceptance-tests/helpers/assets"
	. "github.com/cloudfoundry/cf-acceptance-tests/helpers/services"
)

var _ = Describe("SSO Lifecycle", func() {
	var broker ServiceBroker
	var config OAuthConfig
	var redirectUri string
	var apiEndpoint = helpers.LoadConfig().ApiEndpoint

	Describe("For service clients (provided in catalog)", func() {

		BeforeEach(func() {
			redirectUri = `http://www.purple.com`

			broker = NewServiceBroker(generator.RandomName(), assets.NewAssets().ServiceBroker, context, true)
			broker.Push()
			broker.Service.DashboardClient.RedirectUri = redirectUri
			broker.Configure()

			config = OAuthConfig{}
			config.ClientId = broker.Service.DashboardClient.ID
			config.ClientSecret = broker.Service.DashboardClient.Secret
			config.RedirectUri = redirectUri
			config.RequestedScopes = `openid,cloud_controller_service_permissions.read`

			SetOauthEndpoints(apiEndpoint, &config)

			broker.Create()
		})
开发者ID:naheedmk,项目名称:cf-acceptance-tests,代码行数:30,代码来源:sso_lifecycle_test.go



注:本文中的github.com/cloudfoundry-incubator/cf-test-helpers/generator.RandomName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang helpers.AppUri函数代码示例发布时间:2022-05-23
下一篇:
Golang generator.PrefixedRandomName函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap