vishesh92 commented on code in PR #13178:
URL: https://github.com/apache/cloudstack/pull/13178#discussion_r3257366172
##########
server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java:
##########
@@ -3927,6 +3924,137 @@ public void createVirtualMachineWithExistingSnapshot()
throws ResourceUnavailabl
userVmManagerImpl.createVirtualMachine(deployVMCmd);
}
+ /**
+ * Bug fix: when deploying a VM from a snapshot whose source volume
resided on
+ * local (HOST-scoped) storage, the zone-wide pool check must be skipped.
+ * The source volume's pool type is irrelevant – only the snapshot matters.
+ */
+ @Test
+ public void
createVirtualMachineWithSnapshotFromExpungedLocalStorageVolumeSucceeds()
+ throws ResourceUnavailableException,
InsufficientCapacityException, ResourceAllocationException {
+ DeployVMCmd deployVMCmd = new DeployVMCmd();
+ ReflectionTestUtils.setField(deployVMCmd, "zoneId", zoneId);
Review Comment:
Should we use Mocks here instead of reflection?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]