本文整理汇总了Golang中github.com/cloudfoundry-incubator/receptor/fake_receptor.FakeClient.CreateDesiredLRPReturns方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeClient.CreateDesiredLRPReturns方法的具体用法?Golang FakeClient.CreateDesiredLRPReturns怎么用?Golang FakeClient.CreateDesiredLRPReturns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry-incubator/receptor/fake_receptor.FakeClient
的用法示例。
在下文中一共展示了FakeClient.CreateDesiredLRPReturns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
Expect(fakeReceptorClient.DesiredLRPsCallCount()).To(Equal(1))
})
Context("when the receptor returns errors", func() {
It("returns upsert domain errors", func() {
upsertError := errors.New("You're not that fresh, buddy.")
fakeReceptorClient.UpsertDomainReturns(upsertError)
createAppParams = app_runner.CreateAppParams{}
err := appRunner.CreateApp(createAppParams)
Expect(err).To(MatchError(upsertError))
})
It("returns desiring lrp errors", func() {
receptorError := errors.New("error - Desiring an LRP")
fakeReceptorClient.CreateDesiredLRPReturns(receptorError)
createAppParams = app_runner.CreateAppParams{}
err := appRunner.CreateApp(createAppParams)
Expect(err).To(MatchError(receptorError))
})
It("returns existing count errors", func() {
receptorError := errors.New("error - Existing Count")
fakeReceptorClient.DesiredLRPsReturns([]receptor.DesiredLRPResponse{}, receptorError)
createAppParams = app_runner.CreateAppParams{}
err := appRunner.CreateApp(createAppParams)
Expect(err).To(MatchError(receptorError))
})
})