[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH] Fix to broken tests (2/2)



Mohammed Morsi wrote:
---
 wui/src/app/models/vm.rb                      |    3 ++-
 wui/src/test/functional/vm_controller_test.rb |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/wui/src/app/models/vm.rb b/wui/src/app/models/vm.rb
index 80c7efb..9520a4c 100644
--- a/wui/src/app/models/vm.rb
+++ b/wui/src/app/models/vm.rb
@@ -29,7 +29,8 @@ class Vm < ActiveRecord::Base
   end
   has_and_belongs_to_many :storage_volumes
   validates_presence_of :uuid, :description, :num_vcpus_allocated,
-                        :memory_allocated_in_mb, :memory_allocated, :vnic_mac_addr
+                        :boot_device, :memory_allocated_in_mb,
+                        :memory_allocated, :vnic_mac_addr
acts_as_xapian :texts => [ :uuid, :description, :vnic_mac_addr, :state ],
                  :terms => [ [ :search_users, 'U', "search_users" ] ]
diff --git a/wui/src/test/functional/vm_controller_test.rb b/wui/src/test/functional/vm_controller_test.rb
index 0817754..a626430 100644
--- a/wui/src/test/functional/vm_controller_test.rb
+++ b/wui/src/test/functional/vm_controller_test.rb
@@ -56,7 +56,7 @@ class VmControllerTest < Test::Unit::TestCase
   def test_create
     num_vms = Vm.count
- post :create, :vm_resource_pool_name => 'foobar', :hardware_pool_id => 1, :vm => { :uuid => 'f43b298c-1e65-46fa-965f-0f6fb9ffaa10', :description => 'descript', :num_vcpus_allocated => 4, :memory_allocated => 262144, :vnic_mac_addr => 'AA:BB:CC:DD:EE:FF' }
+    post :create, :vm_resource_pool_name => 'foobar', :hardware_pool_id => 1, :vm => { :uuid => 'f43b298c-1e65-46fa-965f-0f6fb9ffaa10', :description =>     'descript', :num_vcpus_allocated => 4, :memory_allocated => 262144, :vnic_mac_addr => 'AA:BB:CC:DD:EE:FF', :boot_device => 'foobar' }
assert_response :success
almost ACK -- you should replace 'foobar' in ":boot_device => 'foobar'" with one of the valid values -- 'network' or 'hd' or taskomatic won't know what to do with it. With that change, ACK

Scott


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]