コード例 #1
0
				PrimaryIpAddress:         "fake-primary-ip",
			}
			volume.Id = 1234567
			fakeClient.DoRawHttpRequestResponse = []byte("true")
			err = networkStorageService.DetachIscsiVolume(virtualGuest, volume.Id)
			Expect(err).ToNot(HaveOccurred())
		})
	})

	Context("#DeleteObject", func() {
		BeforeEach(func() {
			volume.Id = 1234567
		})

		It("sucessfully deletes the SoftLayer_Network_Storage volume", func() {
			fakeClient.DoRawHttpRequestResponse = []byte("true")
			deleted, err := networkStorageService.DeleteObject(volume.Id)
			Expect(err).ToNot(HaveOccurred())
			Expect(deleted).To(BeTrue())
		})

		It("fails to delete the SoftLayer_Network_Storage volume", func() {
			fakeClient.DoRawHttpRequestResponse = []byte("false")
			deleted, err := networkStorageService.DeleteObject(volume.Id)
			Expect(err).To(HaveOccurred())
			Expect(deleted).To(BeFalse())
		})
	})

})