本文整理汇总了Golang中github.com/cloudfoundry/hm9000/config.Config.CCBaseURL方法的典型用法代码示例。如果您正苦于以下问题:Golang Config.CCBaseURL方法的具体用法?Golang Config.CCBaseURL怎么用?Golang Config.CCBaseURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/hm9000/config.Config
的用法示例。
在下文中一共展示了Config.CCBaseURL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
resultChan = make(chan DesiredStateFetcherResult, 1)
timeProvider = &faketimeprovider.FakeTimeProvider{
TimeToProvide: time.Unix(100, 0),
}
httpClient = fakehttpclient.NewFakeHttpClient()
storeAdapter = fakestoreadapter.New()
store = storepackage.NewStore(conf, storeAdapter, fakelogger.NewFakeLogger())
fetcher = New(conf, store, metricsAccountant, httpClient, timeProvider, fakelogger.NewFakeLogger())
fetcher.Fetch(resultChan)
})
Describe("Fetching with an invalid URL", func() {
BeforeEach(func() {
conf.CCBaseURL = "http://example.com/#%ZZ"
fetcher = New(conf, store, metricsAccountant, httpClient, timeProvider, fakelogger.NewFakeLogger())
fetcher.Fetch(resultChan)
})
It("should send an error down the result channel", func(done Done) {
result := <-resultChan
Ω(result.Success).Should(BeFalse())
Ω(result.Message).Should(Equal("Failed to generate URL request"))
Ω(result.Error).Should(HaveOccurred())
close(done)
}, 0.1)
})
Describe("Fetching batches", func() {
var response DesiredStateServerResponse