It("reports error when pricing item for provided network speed is not available", func() { _, err := virtualGuestService.GetAvailableUpgradeItemPrices(&softlayer.UpgradeOptions{NicSpeed: 999}) Expect(err).To(HaveOccurred()) Expect(err.Error()).To(Equal("Failed to find price for 'nic_speed' (of size 999)")) }) }) Context("#GetPowerState", func() { BeforeEach(func() { virtualGuest.Id = 1234567 fakeClient.DoRawHttpRequestResponse, err = testhelpers.ReadJsonTestFixtures("services", "SoftLayer_Virtual_Guest_Service_getPowerState.json") Expect(err).ToNot(HaveOccurred()) }) It("sucessfully retrieves SoftLayer_Virtual_Guest_State for RUNNING instance", func() { vgPowerState, err := virtualGuestService.GetPowerState(virtualGuest.Id) Expect(err).ToNot(HaveOccurred()) Expect(vgPowerState.KeyName).To(Equal("RUNNING")) }) }) Context("#GetPrimaryIpAddress", func() { BeforeEach(func() { virtualGuest.Id = 1234567 fakeClient.DoRawHttpRequestResponse = []byte("159.99.99.99") Expect(err).ToNot(HaveOccurred()) }) It("sucessfully retrieves SoftLayer virtual guest's primary IP address instance", func() { vgPrimaryIpAddress, err := virtualGuestService.GetPrimaryIpAddress(virtualGuest.Id) Expect(err).ToNot(HaveOccurred())