本文整理汇总了Golang中github.com/cloudfoundry-incubator/runtime-schema/bbs/fake_bbs.FakeReceptorBBS.DesireTaskCallCount方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeReceptorBBS.DesireTaskCallCount方法的具体用法?Golang FakeReceptorBBS.DesireTaskCallCount怎么用?Golang FakeReceptorBBS.DesireTaskCallCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry-incubator/runtime-schema/bbs/fake_bbs.FakeReceptorBBS
的用法示例。
在下文中一共展示了FakeReceptorBBS.DesireTaskCallCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
DiskMB: 12,
CPUWeight: 10,
LogGuid: "guid",
LogSource: "source-name",
ResultFile: "result-file",
Annotation: "some annotation",
Privileged: true,
}
Context("when everything succeeds", func() {
JustBeforeEach(func() {
handler.Create(responseRecorder, newTestRequest(validCreateRequest))
})
It("calls DesireTask on the BBS with the correct task", func() {
Expect(fakeBBS.DesireTaskCallCount()).To(Equal(1))
_, task := fakeBBS.DesireTaskArgsForCall(0)
Expect(task).To(Equal(expectedTask))
})
It("responds with 201 CREATED", func() {
Expect(responseRecorder.Code).To(Equal(http.StatusCreated))
})
It("responds with an empty body", func() {
Expect(responseRecorder.Body.String()).To(Equal(""))
})
Context("when env vars are specified", func() {
BeforeEach(func() {
validCreateRequest.EnvironmentVariables = []receptor.EnvironmentVariable{