[Engine-devel] Unit test failures and RunVmCommand

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?

All issues were fixed ----- Original Message ----- From: "Jon Choate" <jchoate@redhat.com> To: engine-devel@ovirt.org Sent: Wednesday, February 15, 2012 7:49:28 PM Subject: [Engine-devel] Unit test failures and RunVmCommand 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? _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

awesome! Thanks! ----- Original Message -----
From: "Michael Kublin" <mkublin@redhat.com> To: "Jon Choate" <jchoate@redhat.com> Cc: engine-devel@ovirt.org Sent: Thursday, February 16, 2012 6:00:10 AM Subject: Re: [Engine-devel] Unit test failures and RunVmCommand
All issues were fixed
----- Original Message ----- From: "Jon Choate" <jchoate@redhat.com> To: engine-devel@ovirt.org Sent: Wednesday, February 15, 2012 7:49:28 PM Subject: [Engine-devel] Unit test failures and RunVmCommand
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? _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (2)
-
Jon Choate
-
Michael Kublin