danielestevez commented on this pull request.
> + public void deleteImageResourceDoesNotExist() { + assertNull(api().delete(imageName)); + } + + @Test(dependsOnMethods = "deleteImageResourceDoesNotExist") + public void CreateVirtualMachineImageFromExistingVM() { + String id = String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/myVM", getSubscriptionId(), resourceGroupName); + ImageProperties properties = ImageProperties.builder() + .sourceVirtualMachine(ImageProperties.SourceVirtualMachine.create(id)) + .build(); + Image image = api().createOrUpdate(imageName, LOCATION, properties); + assertTrue(stateReached("Succeeded"), "start operation did not complete in the configured timeout"); + assertTrue(id.equals(image.properties().sourceVirtualMachine().id())); + } + + @Test(dependsOnMethods = "CreateVirtualMachineImageFromExistingVM") As i commented in devlist, we should also try to add thests for creating image from existing disk, blob or snapshot. Maybe later but good to have TODOs for it here -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/372#pullrequestreview-27881265