本文整理匯總了Golang中github.com/cloudfoundry/bosh-agent/agentclient/fakes.FakeAgentClient.MountDiskArgsForCall方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeAgentClient.MountDiskArgsForCall方法的具體用法?Golang FakeAgentClient.MountDiskArgsForCall怎麽用?Golang FakeAgentClient.MountDiskArgsForCall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry/bosh-agent/agentclient/fakes.FakeAgentClient
的用法示例。
在下文中一共展示了FakeAgentClient.MountDiskArgsForCall方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
disk = fakebidisk.NewFakeDisk("fake-disk-cid")
})
It("attaches disk to vm in the cloud", func() {
err := vm.AttachDisk(disk)
Expect(err).ToNot(HaveOccurred())
Expect(fakeCloud.AttachDiskInput).To(Equal(fakebicloud.AttachDiskInput{
VMCID: "fake-vm-cid",
DiskCID: "fake-disk-cid",
}))
})
It("sends mount disk to the agent", func() {
err := vm.AttachDisk(disk)
Expect(err).ToNot(HaveOccurred())
Expect(fakeAgentClient.MountDiskArgsForCall(0)).To(Equal("fake-disk-cid"))
})
Context("when attaching disk to cloud fails", func() {
BeforeEach(func() {
fakeCloud.AttachDiskErr = errors.New("fake-attach-error")
})
It("returns an error", func() {
err := vm.AttachDisk(disk)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("fake-attach-error"))
})
})
Context("when mounting disk fails", func() {