本文整理汇总了Golang中code/cloudfoundry/org/bbs/db/dbfakes.FakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexCallCount方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexCallCount方法的具体用法?Golang FakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexCallCount怎么用?Golang FakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexCallCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类code/cloudfoundry/org/bbs/db/dbfakes.FakeActualLRPDB
的用法示例。
在下文中一共展示了FakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexCallCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
})
It("logs and writes to the exit channel", func() {
Eventually(logger).Should(gbytes.Say("unrecoverable-error"))
Eventually(exitCh).Should(Receive())
})
})
Context("when finding the actualLRP fails", func() {
BeforeEach(func() {
fakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexReturns(nil, errors.New("could not find lrp"))
})
It("returns an error and does not retry", func() {
Expect(response.Error.Message).To(Equal("could not find lrp"))
Expect(fakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexCallCount()).To(Equal(1))
})
It("does not emit a change event to the hub", func() {
Consistently(actualHub.EmitCallCount).Should(Equal(0))
})
})
Context("when there is no instance in the actual lrp group", func() {
BeforeEach(func() {
actualLRPGroup.Instance = nil
fakeActualLRPDB.ActualLRPGroupByProcessGuidAndIndexReturns(actualLRPGroup, nil)
})
It("returns an error and does not retry", func() {
Expect(response.Error).To(Equal(models.ErrResourceNotFound))