summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-11 13:01:17 -0500
committerLuke Kanies <luke@madstop.com>2008-04-11 13:01:17 -0500
commitb49fd495622b15f96faf944db1e70cbe9e7fe7c4 (patch)
tree4b5c3ca9f5130b87c13a8a729cc1f332539361c5 /test
parent4aaad26509b2dc9bd45782ec45231e6ea53a4a37 (diff)
downloadpuppet-b49fd495622b15f96faf944db1e70cbe9e7fe7c4.tar.gz
puppet-b49fd495622b15f96faf944db1e70cbe9e7fe7c4.tar.xz
puppet-b49fd495622b15f96faf944db1e70cbe9e7fe7c4.zip
Resources now return the 'should' value for properties from
the [] accessor method (they previously threw an exception when this method was used with properties). This shouldn't have any affect functionally; it just makes the method equivalent to 'should' for properties, but it works for all attribute types now.
Diffstat (limited to 'test')
-rwxr-xr-xtest/rails/host.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/test/rails/host.rb b/test/rails/host.rb
index 582bebcb2..79f0ae398 100755
--- a/test/rails/host.rb
+++ b/test/rails/host.rb
@@ -151,41 +151,4 @@ class TestRailsHost < PuppetTest::TestCase
"loglevel was not added")
end
end
-
- def test_freshness_connect_update
- Puppet::Rails.init
- Puppet[:storeconfigs] = true
-
- Puppet[:code] = " "
- # this is the default server setup
- master = Puppet::Network::Handler.configuration.new(
- :Local => true
- )
-
- # Create a host
- Puppet::Rails::Host.new(:name => "test", :ip => "192.168.0.3").save
-
- assert_nothing_raised("Failed to update last_connect for unknown host") do
- master.version("created",'192.168.0.1')
- end
-
- # Make sure it created the host
- created = Puppet::Rails::Host.find_by_name("created")
- assert(created, "Freshness did not create host")
- assert(created.last_freshcheck,
- "Did not set last_freshcheck on created host")
-
- # Now check on the existing host
- assert_nothing_raised("Failed to update last_connect for unknown host") do
- master.version("test",'192.168.0.2')
- end
-
- # Recreate it, so we're not using the cached object.
- host = Puppet::Rails::Host.find_by_name("test")
-
- # Make sure it created the host
- assert(host.last_freshcheck,
- "Did not set last_freshcheck on existing host")
- end
end
-