func setFakeSoftLayerClientCreateObjectTestFixtures(fakeSoftLayerClient *fakeslclient.FakeSoftLayerClient) { fileNames := []string{ "SoftLayer_Virtual_Guest_Service_createObject.json", "SoftLayer_Virtual_Guest_Service_getPowerState.json", "SoftLayer_Virtual_Guest_Service_getActiveTransactions.json", "SoftLayer_Virtual_Guest_Service_setMetadata.json", "SoftLayer_Virtual_Guest_Service_configureMetadataDisk.json", "SoftLayer_Virtual_Guest_Service_getPowerState.json", "SoftLayer_Virtual_Guest_Service_getPowerState.json", "SoftLayer_Virtual_Guest_Service_getActiveTransactions.json", "SoftLayer_Virtual_Guest_Service_getUpgradeItemPrices.json", "SoftLayer_Product_Order_Service_placeOrder.json", } testhelpers.SetTestFixturesForFakeSoftLayerClient(fakeSoftLayerClient, fileNames) }
. "github.com/cloudcredo/bosh-lattice-cpi/softlayer/disk" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("SoftLayerDisk", func() { var ( fc *fakeclient.FakeSoftLayerClient disk SoftLayerDisk ) BeforeEach(func() { fc = fakeclient.NewFakeSoftLayerClient("fake-user", "fake-key") logger := boshlog.NewLogger(boshlog.LevelNone) disk = NewSoftLayerDisk(1234, fc, logger) }) Describe("Delete", func() { It("deletes an iSCSI disk successfully", func() { fileNames := []string{ "SoftLayer_Account_Service_getIscsiVolume.json", "SoftLayer_Billing_Item_Cancellation_Request_Service_createObject.json", } testhelpers.SetTestFixturesForFakeSoftLayerClient(fc, fileNames) err := disk.Delete() Expect(err).ToNot(HaveOccurred()) }) }) })