
16 Feb
2012
16 Feb
'12
2:49 a.m.
I was trying to fix the broken unit tests so that I can make sure my changes are not breaking anything. While trying to fix the RunVmCommand tests I found some logic that I am unsure of. It seems like with all of the nested conditions in this method the scope of some of the checks is wrong. In RunVmCommand.CanRunVm we check the boot sequence. If the vm is set to only boot from a hard disk, we check to make sure that the vm has a hard disk and that it is plugged. If both of these are true, we do not perform any other checks and return that the vm can start. One of the checks that gets skipped is whether or not the vm is already running. Do we really want to skip that check?