Expect(fakeStage.PerformCalls[0]).To(Equal(&fakebiui.PerformCall{ Name: "Waiting for the agent on VM 'fake-vm-cid'", })) }) It("stops vm", func() { err := instance.Delete(pingTimeout, pingDelay, fakeStage) Expect(err).ToNot(HaveOccurred()) Expect(fakeVM.StopCalled).To(Equal(1)) }) It("unmounts vm disks", func() { firstDisk := fakebidisk.NewFakeDisk("fake-disk-1") secondDisk := fakebidisk.NewFakeDisk("fake-disk-2") fakeVM.ListDisksDisks = []bidisk.Disk{firstDisk, secondDisk} err := instance.Delete(pingTimeout, pingDelay, fakeStage) Expect(err).ToNot(HaveOccurred()) Expect(fakeVM.UnmountDiskInputs).To(Equal([]fakebivm.UnmountDiskInput{ {Disk: firstDisk}, {Disk: secondDisk}, })) Expect(fakeStage.PerformCalls[2:4]).To(Equal([]*fakebiui.PerformCall{ {Name: "Unmounting disk 'fake-disk-1'"}, {Name: "Unmounting disk 'fake-disk-2'"}, })) })