diff options
Diffstat (limited to 'test/network/handler')
-rwxr-xr-x | test/network/handler/fileserver.rb | 8 | ||||
-rwxr-xr-x | test/network/handler/master.rb | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/network/handler/fileserver.rb b/test/network/handler/fileserver.rb index b3a9aef2b..1046617ec 100755 --- a/test/network/handler/fileserver.rb +++ b/test/network/handler/fileserver.rb @@ -433,6 +433,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 bbdc021b9..0de38414a 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 |