} testhelpers.SetTestFixturesForFakeSoftLayerClient(softLayerClient, fileNames) }) It("attaches the iSCSI volume successfully (multipath-tool installed)", func() { expectedCmdResults := []string{ "/sbin/multipath", "No devices found", "", "", "", "", "", expectedDmSetupLs1, } testhelpers.SetTestFixturesForFakeSSHClient(sshClient, expectedCmdResults, nil) vm = NewSoftLayerVM(1234567, softLayerClient, sshClient, agentEnvService, logger) bslcommon.TIMEOUT = 2 * time.Second bslcommon.POLLING_INTERVAL = 1 * time.Second err := vm.AttachDisk(disk) Expect(err).ToNot(HaveOccurred()) }) It("attaches the iSCSI volume successfully (multipath-tool not installed)", func() { expectedCmdResults := []string{ "", expectedPartitions1, "", "", "",
DedicatedAccountHostOnlyFlag: true, PrivateNetworkOnlyFlag: false, SshKeys: []sldatatypes.SshKey{{Id: 74826}}, BlockDevices: []sldatatypes.BlockDevice{{ Device: "0", DiskImage: sldatatypes.DiskImage{Capacity: 100}}}, NetworkComponents: []sldatatypes.NetworkComponents{{MaxSpeed: 1000}}, PrimaryNetworkComponent: sldatatypes.PrimaryNetworkComponent{ NetworkVlan: sldatatypes.NetworkVlan{Id: 524956}}, PrimaryBackendNetworkComponent: sldatatypes.PrimaryBackendNetworkComponent{ NetworkVlan: sldatatypes.NetworkVlan{Id: 524956}}, } expectedCmdResults := []string{ "", } testhelpers.SetTestFixturesForFakeSSHClient(sshClient, expectedCmdResults, nil) setFakeSoftLayerClientCreateObjectTestFixturesWithEphemeralDiskSize(softLayerClient) vm, err := creator.Create(agentID, stemcell, cloudProps, networks, env) Expect(err).ToNot(HaveOccurred()) Expect(vm.ID()).To(Equal(1234567)) }) It("returns a new SoftLayerVM without ephemeral size", func() { cloudProps = VMCloudProperties{ StartCpus: 4, MaxMemory: 2048, Domain: "fake-domain.com", BlockDeviceTemplateGroup: sldatatypes.BlockDeviceTemplateGroup{ GlobalIdentifier: "fake-uuid", }, RootDiskSize: 25, BoshIp: "10.0.0.1",