Skip to content

Commit

Permalink
Merge pull request #14462 from agrare/add_ems_ref_obj_to_ems_folder_f…
Browse files Browse the repository at this point in the history
…actories

Add ems_ref_obj to VMware folder spec factories
(cherry picked from commit 8dd095d)
  • Loading branch information
Fryguy authored and simaishi committed May 11, 2017
1 parent 80f832f commit 9d0c58f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions spec/factories/ems_folder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,28 @@
#

factory :vmware_folder, :parent => :ems_folder do
sequence(:ems_ref) { |n| "group-d#{n}" }
sequence(:ems_ref) { |n| "group-d#{n}" }
sequence(:ems_ref_obj) { |n| VimString.new("group-d#{n}", "Folder", "ManagedObjectReference") }
end

factory :vmware_folder_vm, :parent => :ems_folder do
sequence(:ems_ref) { |n| "group-v#{n}" }
sequence(:ems_ref) { |n| "group-v#{n}" }
sequence(:ems_ref_obj) { |n| VimString.new("group-v#{n}", "Folder", "ManagedObjectReference") }
end

factory :vmware_folder_host, :parent => :ems_folder do
sequence(:ems_ref) { |n| "group-h#{n}" }
sequence(:ems_ref) { |n| "group-h#{n}" }
sequence(:ems_ref_obj) { |n| VimString.new("group-h#{n}", "Folder", "ManagedObjectReference") }
end

factory :vmware_folder_datastore, :parent => :ems_folder do
sequence(:ems_ref) { |n| "group-s#{n}" }
sequence(:ems_ref) { |n| "group-s#{n}" }
sequence(:ems_ref_obj) { |n| VimString.new("group-s#{n}", "Folder", "ManagedObjectReference") }
end

factory :vmware_folder_network, :parent => :ems_folder do
sequence(:ems_ref) { |n| "group-n#{n}" }
sequence(:ems_ref) { |n| "group-n#{n}" }
sequence(:ems_ref_obj) { |n| VimString.new("group-n#{n}", "Folder", "ManagedObjectReference") }
end

factory :vmware_folder_root, :parent => :vmware_folder do
Expand Down Expand Up @@ -66,6 +71,8 @@

factory :vmware_datacenter, :parent => :vmware_folder, :class => "Datacenter" do
sequence(:name) { |n| "Test Datacenter #{seq_padded_for_sorting(n)}" }
sequence(:ems_ref) { |n| "datacenter-#{n}" }
sequence(:ems_ref_obj) { |n| VimString.new("datacenter-#{n}", "Datacenter", "ManagedObjectReference") }
end
end

Expand Down

0 comments on commit 9d0c58f

Please sign in to comment.