Expect(sshKey.Label).To(Equal("TEST:softlayer-go")) Expect(sshKey.ModifyDate).To(BeNil()) Expect(sshKey.Label).To(Equal("TEST:softlayer-go")) } }) }) Context("#PowerCycle", func() { BeforeEach(func() { virtualGuest.Id = 1234567 }) It("sucessfully power cycle virtual guest instance", func() { fakeClient.DoRawHttpRequestResponse = []byte("true") rebooted, err := virtualGuestService.PowerCycle(virtualGuest.Id) Expect(err).ToNot(HaveOccurred()) Expect(rebooted).To(BeTrue()) }) It("fails to power cycle virtual guest instance", func() { fakeClient.DoRawHttpRequestResponse = []byte("false") rebooted, err := virtualGuestService.PowerCycle(virtualGuest.Id) Expect(err).To(HaveOccurred()) Expect(rebooted).To(BeFalse()) }) }) Context("#PowerOff", func() { BeforeEach(func() {