"SoftLayer_Virtual_Guest_Service_getActiveTransactions_None.json", "SoftLayer_Virtual_Guest_Service_deleteObject_true.json", "SoftLayer_Virtual_Guest_Service_getActiveTransactions.json", "SoftLayer_Virtual_Guest_Service_getObject.json", "SoftLayer_Virtual_Guest_Service_getActiveTransaction.json", "SoftLayer_Virtual_Guest_Service_getEmptyObject.json", } testhelpers.SetTestFixturesForFakeSoftLayerClient(fakeSoftLayerClient, fileNames) }) It("deletes the VM successfully", func() { vm = NewSoftLayerVM(1234567, fakeSoftLayerClient, sshClient, agentEnvService, logger) bslcommon.TIMEOUT = 2 * time.Second bslcommon.POLLING_INTERVAL = 1 * time.Second common.SetOSEnvVariable("OS_RELOAD_ENABLED", "FALSE") err := vm.Delete("fake-agentID") Expect(err).ToNot(HaveOccurred()) }) It("postCheckActiveTransactionsForDeleteVM time out", func() { vm = NewSoftLayerVM(1234567, fakeSoftLayerClient, sshClient, agentEnvService, logger) bslcommon.TIMEOUT = 1 * time.Second bslcommon.POLLING_INTERVAL = 1 * time.Second err := vm.Delete("") Expect(err).To(HaveOccurred()) }) }) Context("valid VM ID is used and averageDuration is \"\"", func() {
var ( SQLITE_DB_FOLDER = "/tmp/concurrency_sqlite_test" SQLITE_DB_FILE = "vm_pool.sqlite" SQLITE_DB_FILE_PATH = filepath.Join(SQLITE_DB_FOLDER, SQLITE_DB_FILE) stemcellUuid = "fake_stemcell_uuid" domain = "softlayer.com" logger = boshlog.NewLogger(boshlog.LevelInfo) ) var _ = Describe("BOSH Director Level Integration for OS Reload", func() { var ( err error ) BeforeEach(func() { common.SetOSEnvVariable("OS_RELOAD_ENABLED", "TRUE") common.SetOSEnvVariable("SQLITE_DB_FOLDER", SQLITE_DB_FOLDER) common.SetOSEnvVariable("SQLITE_DB_FILE", SQLITE_DB_FILE) testhelpers.TIMEOUT = 35 * time.Minute testhelpers.POLLING_INTERVAL = 10 * time.Second err = os.RemoveAll(SQLITE_DB_FOLDER) Expect(err).ToNot(HaveOccurred()) err = bslcvmpool.InitVMPoolDB(bslcvmpool.DB_RETRY_TIMEOUT, bslcvmpool.DB_RETRY_INTERVAL, logger) Expect(err).ToNot(HaveOccurred()) populateDB() })