Project

General

Profile

« Previous | Next » 

Revision 745ff850

Added by Michael Moll about 5 years ago

Refs #19768 - Fix Layout/ClosingParenthesisIndentation cop

View differences:

app/helpers/compute_resources_helper.rb
select_f(f, :http_proxy_id, HttpProxy.all, :id, :name,
{:include_blank => true },
{ :label => _("HTTP Proxy") }
)
)
end
end
app/helpers/compute_resources_vms_helper.rb
:title => _("Associate VM to a Foreman host"),
:method => :put,
:class => "btn btn-default"
)
)
end
def vm_console_action(vm)
app/helpers/hosts_and_hostgroups_helper.rb
:user_set => user_set?(:realm_id)
},
{ :help_inline => :indicator }
).html_safe
).html_safe
end
def multiple_filter(hosts)
app/helpers/hosts_helper.rb
:target => '#review_before_build',
:url => review_before_build_host_path(:id => host)
}
)
)
end
),
if host.supports_power?
test/controllers/unattended_controller_test.rb
:architecture => architectures(:x86_64),
:organization => @org,
:location => @loc
)
)
end
test 'returns not_found when no kind is provided' do
......
:architecture => architectures(:x86_64),
:organization => @org,
:location => @loc
)
)
end
test "should get a preseed finish script" do
......
:ptable => ptable_ubuntu,
:medium => media(:ubuntu),
:architecture => architectures(:x86_64)
)
)
end
test "hosts with a template proxy which supplies a templateServer should use it" do
test/factories/host_related.rb
FactoryBot.create(:domain,
:dns => FactoryBot.create(:smart_proxy,
:features => [FactoryBot.create(:feature, :dns)])
)
)
end
interfaces do
[FactoryBot.build(:nic_managed, :without_ipv4,
test/models/host_test.rb
:mac => '00:00:00:11:22:33',
:ip => '10.10.0.1',
:subnet => subnet
)
)
hash = { :eth0 => {:macaddress => '00:00:00:11:22:33', :ipaddress => '10.10.20.2', :virtual => false}
}.with_indifferent_access
parser = stub(:class_name_humanized => 'TestParser', :interfaces => hash, :ipmi_interface => {}, :suggested_primary_interface => hash.to_a.last)
......
:mac => '00:00:00:11:22:33',
:ip => '10.10.0.1',
:subnet => subnet
)
)
hash = { :eth0 => {:macaddress => '00:00:00:11:22:33', :ipaddress => '10.10.20.2', :virtual => false}
}.with_indifferent_access
parser = stub(:class_name_humanized => 'TestParser', :interfaces => hash, :ipmi_interface => {}, :suggested_primary_interface => hash.to_a.last)
......
:mac => '00:00:00:11:22:33',
:ip => '10.10.0.1',
:subnet => subnet
)
)
hash = { :eth0 => {:macaddress => '00:00:00:11:22:33', :ipaddress => '10.10.20.2', :virtual => false, :keep_subnet => true}
}.with_indifferent_access
parser = stub(:class_name_humanized => 'TestParser', :interfaces => hash, :ipmi_interface => {}, :suggested_primary_interface => hash.to_a.last)
......
:ip6 => '2001:db8::10',
:subnet => subnet,
:subnet6 => subnet6
)
)
hash = { :eth0 => {:macaddress => '00:00:00:11:22:33', :ipaddress => '10.10.0.1', :virtual => false}
}.with_indifferent_access
parser = stub(:class_name_humanized => 'TestParser', :interfaces => hash, :ipmi_interface => {}, :suggested_primary_interface => hash.to_a.last)
test/models/nics/bond_test.rb
host.interfaces << FactoryBot.build(:nic_managed,
:identifier => device,
:mac => "00:53:67:ab:dd:0#{i}"
)
)
end
assert_equal ['00:53:67:ab:dd:00', '00:53:67:ab:dd:01', '00:53:67:ab:dd:02'], bond.children_mac_addresses
end
test/models/operatingsystems/solaris_test.rb
:medium => media(:solaris10),
:puppet_proxy => smart_proxies(:puppetmaster),
:ptable => FactoryBot.create(:ptable, :operatingsystem_ids => [operatingsystems(:solaris10).id])
)
)
Resolv::DNS.any_instance.stubs(:getaddress).with("brsla01").returns("2.3.4.5").once
Resolv::DNS.any_instance.stubs(:getaddress).with("brsla01.yourdomain.net").returns("2.3.4.5").once
result = h.os.jumpstart_params h, h.model.vendor_class
test/models/operatingsystems/ztp_test.rb
:medium => media(:vrp5),
:puppet_proxy => smart_proxies(:puppetmaster),
:ptable => FactoryBot.create(:ptable, :operatingsystem_ids => [operatingsystems(:vrp5).id])
)
)
medium_provider = Foreman::Plugin.medium_providers.find_provider h
result = h.os.ztp_arguments h
assert_equal(
test/models/orchestration/dhcp_test.rb
FactoryBot.build(:nic_interface,
:identifier => 'eth0',
:mac => '00:53:67:ab:dd:00'
),
),
FactoryBot.build(:nic_interface,
:identifier => 'eth1',
:mac => '00:53:67:ab:dd:01'
)
)
]
end
let(:host) do
test/models/orchestration/tftp_test.rb
FactoryBot.build(:nic_interface,
:identifier => 'eth0',
:mac => '00:53:67:ab:dd:00'
),
),
FactoryBot.build(:nic_interface,
:identifier => 'eth1',
:mac => '00:53:67:ab:dd:01'
)
)
]
end
let(:host) do
test/models/subnet_test.rb
:name => 'valid',
:network => '123.123.123.0',
:mask => '255.255.255.0'
)
)
assert_equal "valid (123.123.123.0/24)", subnet.to_label
end

Also available in: Unified diff