Project

General

Profile

« Previous | Next » 

Revision 1f32612a

Added by Ivan Necas almost 6 years ago

Fixes #21172 - load template variables to partition tables

View differences:

test/models/host_test.rb
end
test "custom_disk_partition_with_erb" do
h = FactoryBot.create(:host)
h.disk = "<%= template_name %>"
assert h.save
assert h.disk.present?
assert_equal "Custom disk layout", h.diskLayout
operatingsystem = operatingsystems(:redhat)
host = FactoryBot.build(
:host,
:operatingsystem => operatingsystem,
:architecture => FactoryGirl.build(:architecture)
)
host.disk = "<%= template_name %> - <%= @osver %>"
assert host.save
assert host.disk.present?
assert_equal "Custom disk layout - #{operatingsystem.major}", host.diskLayout
end
test "custom_disk_partition_with_ptable" do

Also available in: Unified diff