本文整理汇总了Golang中github.com/cloudfoundry/cf-acceptance-tests/helpers/app_helpers.SetBackend函数的典型用法代码示例。如果您正苦于以下问题:Golang SetBackend函数的具体用法?Golang SetBackend怎么用?Golang SetBackend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetBackend函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: pushApp
func pushApp(appName, buildpack string) {
Expect(cf.Cf("push",
appName,
"--no-start",
"-b", buildpack,
"-m", DEFAULT_MEMORY_LIMIT,
"-p", assets.NewAssets().Dora,
"-d", Config.GetAppsDomain()).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))
app_helpers.SetBackend(appName)
}
开发者ID:nickwei84,项目名称:cf-acceptance-tests,代码行数:10,代码来源:running_security_groups.go
示例2: Push
func (b ServiceBroker) Push(config cats_config.CatsConfig) {
Expect(cf.Cf(
"push", b.Name,
"--no-start",
"-b", config.GetRubyBuildpackName(),
"-m", DEFAULT_MEMORY_LIMIT,
"-p", b.Path,
"-d", config.GetAppsDomain(),
).Wait(Config.BrokerStartTimeoutDuration())).To(Exit(0))
app_helpers.SetBackend(b.Name)
Expect(cf.Cf("start", b.Name).Wait(Config.BrokerStartTimeoutDuration())).To(Exit(0))
}
开发者ID:nickwei84,项目名称:cf-acceptance-tests,代码行数:12,代码来源:broker.go
示例3: Push
func (b ServiceBroker) Push() {
config := helpers.LoadConfig()
Expect(cf.Cf(
"push", b.Name,
"--no-start",
"-b", config.RubyBuildpackName,
"-m", DEFAULT_MEMORY_LIMIT,
"-p", b.Path,
"-d", config.AppsDomain,
).Wait(BROKER_START_TIMEOUT)).To(Exit(0))
app_helpers.SetBackend(b.Name)
Expect(cf.Cf("start", b.Name).Wait(BROKER_START_TIMEOUT)).To(Exit(0))
}
开发者ID:cf-routing,项目名称:cf-acceptance-tests,代码行数:13,代码来源:broker.go
示例4:
if event.Entity.AppName == appName && event.Entity.State == state {
return true, event
}
}
return false, AppUsageEvent{}
}
var _ = Describe("Application Lifecycle", func() {
var appName string
BeforeEach(func() {
appName = generator.PrefixedRandomName("CATS-APP-")
Expect(cf.Cf("push", appName, "--no-start", "-b", config.RubyBuildpackName, "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().Dora, "-d", config.AppsDomain).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
app_helpers.SetBackend(appName)
Expect(cf.Cf("start", appName).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
})
AfterEach(func() {
app_helpers.AppReport(appName, DEFAULT_TIMEOUT)
Expect(cf.Cf("delete", appName, "-f", "-r").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
})
Describe("pushing", func() {
It("makes the app reachable via its bound route", func() {
Eventually(func() string {
return helpers.CurlAppRoot(appName)
}, DEFAULT_TIMEOUT).Should(ContainSubstring("Hi, I'm Dora!"))
})
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:31,代码来源:lifecycle_test.go
示例5:
Expect(string(curlCmd.Err.Contents())).To(HaveLen(0))
return string(curlCmd.Out.Contents())
}
BeforeEach(func() {
orgName = context.RegularUserContext().Org
spaceName = context.RegularUserContext().Space
domainName = generator.RandomName() + "." + helpers.LoadConfig().AppsDomain
cf.AsUser(context.AdminUserContext(), DEFAULT_TIMEOUT, func() {
Expect(cf.Cf("create-shared-domain", domainName).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
})
appNameDora = generator.PrefixedRandomName("CATS-APP-")
Expect(cf.Cf("push", appNameDora, "--no-start", "-b", config.RubyBuildpackName, "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().Dora, "-d", config.AppsDomain).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
app_helpers.SetBackend(appNameDora)
Expect(cf.Cf("start", appNameDora).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
appNameSimple = generator.PrefixedRandomName("CATS-APP-")
Expect(cf.Cf("push", appNameSimple, "--no-start", "-b", config.RubyBuildpackName, "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().HelloWorld, "-d", config.AppsDomain).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
app_helpers.SetBackend(appNameSimple)
Expect(cf.Cf("start", appNameSimple).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
})
AfterEach(func() {
app_helpers.AppReport(appNameDora, DEFAULT_TIMEOUT)
app_helpers.AppReport(appNameSimple, DEFAULT_TIMEOUT)
cf.AsUser(context.AdminUserContext(), DEFAULT_TIMEOUT, func() {
Expect(cf.Cf("target", "-o", orgName).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
Expect(cf.Cf("delete-shared-domain", domainName, "-f").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:31,代码来源:wildcard_routes_test.go
示例6:
}
type StatsResponse map[string]Stat
type DoraCurlResponse struct {
Stdout string
Stderr string
ReturnCode int `json:"return_code"`
}
var serverAppName, securityGroupName, privateHost string
var privatePort int
BeforeEach(func() {
serverAppName = generator.PrefixedRandomName("CATS-APP-")
Expect(cf.Cf("push", serverAppName, "--no-start", "-b", config.RubyBuildpackName, "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().Dora, "-d", config.AppsDomain).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
app_helpers.SetBackend(serverAppName)
Expect(cf.Cf("start", serverAppName).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
// gather app url
var appsResponse AppsResponse
cfResponse := cf.Cf("curl", fmt.Sprintf("/v2/apps?q=name:%s", serverAppName)).Wait(DEFAULT_TIMEOUT).Out.Contents()
json.Unmarshal(cfResponse, &appsResponse)
serverAppUrl := appsResponse.Resources[0].Metadata.Url
// gather app stats for dea ip and app port
var statsResponse StatsResponse
cfResponse = cf.Cf("curl", fmt.Sprintf("%s/stats", serverAppUrl)).Wait(DEFAULT_TIMEOUT).Out.Contents()
json.Unmarshal(cfResponse, &statsResponse)
privateHost = statsResponse["0"].Stats.Host
privatePort = statsResponse["0"].Stats.Port
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:31,代码来源:running_security_groups_test.go
示例7:
"github.com/cloudfoundry-incubator/cf-test-helpers/helpers"
"github.com/cloudfoundry/cf-acceptance-tests/helpers/app_helpers"
"github.com/cloudfoundry/cf-acceptance-tests/helpers/assets"
"github.com/cloudfoundry/cf-acceptance-tests/helpers/random_name"
"github.com/cloudfoundry/cf-acceptance-tests/helpers/v3_helpers"
)
var _ = AppsDescribe("Uploading and Downloading droplets", func() {
var helloWorldAppName string
var out bytes.Buffer
BeforeEach(func() {
helloWorldAppName = random_name.CATSRandomName("APP")
Expect(cf.Cf("push", helloWorldAppName, "--no-start", "-b", Config.GetRubyBuildpackName(), "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().HelloWorld, "-d", Config.GetAppsDomain()).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))
app_helpers.SetBackend(helloWorldAppName)
Expect(cf.Cf("start", helloWorldAppName).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))
})
AfterEach(func() {
app_helpers.AppReport(helloWorldAppName, Config.DefaultTimeoutDuration())
Expect(cf.Cf("delete", helloWorldAppName, "-f", "-r").Wait(Config.DefaultTimeoutDuration())).To(Exit(0))
})
It("Users can manage droplet bits for an app", func() {
By("Downloading the droplet for the app")
guid := cf.Cf("app", helloWorldAppName, "--guid").Wait(Config.DefaultTimeoutDuration()).Out.Contents()
appGuid := strings.TrimSpace(string(guid))
开发者ID:nickwei84,项目名称:cf-acceptance-tests,代码行数:30,代码来源:droplet_uploading_and_downloading.go
示例8:
var listenerAppName string
var logs *Session
var interrupt chan struct{}
var serviceName string
Describe("Syslog drains", func() {
BeforeEach(func() {
interrupt = make(chan struct{}, 1)
serviceName = random_name.CATSRandomName("SVIN")
listenerAppName = random_name.CATSRandomName("APP")
logWriterAppName = random_name.CATSRandomName("APP")
Eventually(cf.Cf("push", listenerAppName, "--no-start", "--health-check-type", "port", "-b", Config.GetGoBuildpackName(), "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().SyslogDrainListener, "-d", Config.GetAppsDomain(), "-f", assets.NewAssets().SyslogDrainListener+"/manifest.yml"), Config.DefaultTimeoutDuration()).Should(Exit(0), "Failed to push app")
Eventually(cf.Cf("push", logWriterAppName, "--no-start", "-b", Config.GetRubyBuildpackName(), "-m", DEFAULT_MEMORY_LIMIT, "-p", assets.NewAssets().RubySimple, "-d", Config.GetAppsDomain()), Config.DefaultTimeoutDuration()).Should(Exit(0), "Failed to push app")
app_helpers.SetBackend(listenerAppName)
app_helpers.SetBackend(logWriterAppName)
Expect(cf.Cf("start", listenerAppName).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))
Expect(cf.Cf("start", logWriterAppName).Wait(Config.CfPushTimeoutDuration())).To(Exit(0))
})
AfterEach(func() {
logs.Kill()
close(interrupt)
app_helpers.AppReport(logWriterAppName, Config.DefaultTimeoutDuration())
app_helpers.AppReport(listenerAppName, Config.DefaultTimeoutDuration())
Eventually(cf.Cf("delete", logWriterAppName, "-f", "-r"), Config.DefaultTimeoutDuration()).Should(Exit(0), "Failed to delete app")
Eventually(cf.Cf("delete", listenerAppName, "-f", "-r"), Config.DefaultTimeoutDuration()).Should(Exit(0), "Failed to delete app")
开发者ID:nickwei84,项目名称:cf-acceptance-tests,代码行数:31,代码来源:syslog_drain.go
示例9:
"-b", config.RubyBuildpackName,
"-m", DEFAULT_MEMORY_LIMIT,
"-p", assets.NewAssets().Golang,
"-d", config.AppsDomain,
).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
Expect(cf.Cf("push", helloWorldAppName,
"--no-start",
"-m", DEFAULT_MEMORY_LIMIT,
"-p", assets.NewAssets().HelloWorld,
"-d", config.AppsDomain,
).Wait(DEFAULT_TIMEOUT)).To(Exit(0))
})
AfterEach(func() {
app_helpers.AppReport(golangAppName, DEFAULT_TIMEOUT)
app_helpers.AppReport(helloWorldAppName, DEFAULT_TIMEOUT)
Expect(cf.Cf("delete", golangAppName, "-f", "-r").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
Expect(cf.Cf("delete", helloWorldAppName, "-f", "-r").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
})
It("Copies over the package from the source app to the destination app", func() {
app_helpers.SetBackend(golangAppName)
Expect(cf.Cf("copy-source", helloWorldAppName, golangAppName).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
Eventually(func() string {
return helpers.CurlAppRoot(golangAppName)
}, DEFAULT_TIMEOUT).Should(ContainSubstring("Hello, world!"))
})
})
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:30,代码来源:app_bits_copy_test.go
示例10: StartApp
func StartApp(app string) {
app_helpers.SetBackend(app)
Expect(cf.Cf("start", app).Wait(CF_PUSH_TIMEOUT)).To(Exit(0))
}
开发者ID:cf-routing,项目名称:cf-acceptance-tests,代码行数:4,代码来源:routing_suite_test.go
注:本文中的github.com/cloudfoundry/cf-acceptance-tests/helpers/app_helpers.SetBackend函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论