Revision b09b4515
Added by Ohad Levy about 14 years ago
- ID b09b451583194c3bae7cafc2b5331f1319c4681a
Fixes #193 - move hosts controller away from AS
- Remove active scaffold from hosts controller.
- changed default host graphs from one day for up to one week
- added dynamic dropdown boxes for host creation / edit page (e.g. for puppet classes, operating systems etc).
- converted puppet class selection to a template, using it in hostgroups and hosts edit page.
- Renamed puppetgroups to hostgroups for consistency
- Added search option to list, this include search by facts as well
test/unit/host_test.rb | ||
---|---|---|
test "should import facts from yaml of a new host" do
|
||
assert Host.importHostAndFacts(File.read(File.expand_path(File.dirname(__FILE__) + "/facts.yml")))
|
||
end
|
||
|
||
test "should not save if both ptable and disk are not defined" do
|
||
host = Host.create :name => "myfullhost", :mac => "aabbecddeeff", :ip => "123.05.02.03",
|
||
:domain => Domain.find_or_create_by_name("company.com"), :operatingsystem => Operatingsystem.first,
|
||
:architecture => Architecture.first, :environment => Environment.first
|
||
assert true unless SETTINGS[:attended]
|
||
assert !host.valid?
|
||
if SETTINGS[:unattended].nil? or SETTINGS[:unattended]
|
||
test "should not save if both ptable and disk are not defined" do
|
||
host = Host.create :name => "myfullhost", :mac => "aabbecddeeff", :ip => "123.05.02.03",
|
||
:domain => Domain.find_or_create_by_name("company.com"), :operatingsystem => Operatingsystem.first,
|
||
:architecture => Architecture.first, :environment => Environment.first
|
||
assert true unless SETTINGS[:attended]
|
||
assert !host.valid?
|
||
end
|
||
end
|
||
|
||
test "should save if ptable is defined" do
|
Also available in: Unified diff