summaryrefslogtreecommitdiffstats
path: root/test/network/handler
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-10-09 15:51:05 +0200
committerLuke Kanies <luke@madstop.com>2008-10-09 15:51:05 +0200
commit9ef6209b3ed1269f7cd1e6a8d0f189f6b5712800 (patch)
tree3c786b42679f3bea18979aceb8e3bf2a5184f366 /test/network/handler
parentb96bdc6a63f7be6b724c2aa7ad0ea007cba81718 (diff)
parent0fff7d76e89a650f5d2e78b2c69b30635880c36b (diff)
Merge branch '0.24.x' of git://github.com/jamtur01/puppet into 0.24.x
Diffstat (limited to 'test/network/handler')
-rwxr-xr-xtest/network/handler/fileserver.rb8
-rwxr-xr-xtest/network/handler/master.rb4
2 files changed, 11 insertions, 1 deletions
diff --git a/test/network/handler/fileserver.rb b/test/network/handler/fileserver.rb
index a705dbf4b..873657e5d 100755
--- a/test/network/handler/fileserver.rb
+++ b/test/network/handler/fileserver.rb
@@ -437,6 +437,14 @@ class TestFileServer < Test::Unit::TestCase
assert_nil(retval, "Description of non-existent mounts returned a value")
end
+ def test_describe_does_not_fail_when_mount_does_not_find_file
+ server = Puppet::Network::Handler.fileserver.new(:Local => true, :Config => false)
+
+ assert_nothing_raised("Failed when describing missing plugins") do
+ server.describe "/plugins"
+ end
+ end
+
# test that our config file is parsing and working as planned
def test_configfile
server = nil
diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb
index d342af88c..654404ae5 100755
--- a/test/network/handler/master.rb
+++ b/test/network/handler/master.rb
@@ -25,7 +25,9 @@ class TestMaster < Test::Unit::TestCase
now1 = mock 'now1'
Time.expects(:now).returns(now1)
- assert_equal(@master.freshness, now1, "Did not return current time as freshness")
+ now1.expects(:to_i).returns 10
+
+ assert_equal(@master.freshness, 10, "Did not return current time as freshness")
end
def test_hostname_is_used_if_client_is_missing