本文整理匯總了Golang中github.com/cloudfoundry-incubator/bbs/fake_bbs.FakeClient.RemoveActualLRPCallCount方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeClient.RemoveActualLRPCallCount方法的具體用法?Golang FakeClient.RemoveActualLRPCallCount怎麽用?Golang FakeClient.RemoveActualLRPCallCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry-incubator/bbs/fake_bbs.FakeClient
的用法示例。
在下文中一共展示了FakeClient.RemoveActualLRPCallCount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
expectedRunRequest, err := rep.NewRunRequestFromDesiredLRP(container.Guid, desiredLRP, &expectedLrpKey, &expectedInstanceKey)
Expect(err).NotTo(HaveOccurred())
delegateLogger, runRequest := containerDelegate.RunContainerArgsForCall(0)
Expect(*runRequest).To(Equal(expectedRunRequest))
Expect(delegateLogger.SessionName()).To(Equal(expectedSessionName))
})
Context("when running fails", func() {
BeforeEach(func() {
containerDelegate.RunContainerReturns(false)
})
It("removes the actual LRP", func() {
Expect(bbsClient.RemoveActualLRPCallCount()).To(Equal(1))
processGuid, index := bbsClient.RemoveActualLRPArgsForCall(0)
Expect(processGuid).To(Equal(expectedLrpKey.ProcessGuid))
Expect(int32(index)).To(Equal(expectedLrpKey.Index))
})
})
})
var itClaimsTheLRPOrDeletesTheContainer = func(expectedSessionName string) {
It("claims the lrp", func() {
Expect(bbsClient.ClaimActualLRPCallCount()).To(Equal(1))
processGuid, index, instanceKey := bbsClient.ClaimActualLRPArgsForCall(0)
Expect(processGuid).To(Equal(expectedLrpKey.ProcessGuid))
Expect(int32(index)).To(Equal(expectedLrpKey.Index))
Expect(*instanceKey).To(Equal(expectedInstanceKey))