summaryrefslogtreecommitdiffstats
path: root/test/network/client
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-18 16:56:20 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-18 16:56:20 +0000
commit5257837ecb85fd37553430fe5e5030d775dbb7bb (patch)
tree4b2ad2a9f6fa494aed994be0e5051a4ace87b2e7 /test/network/client
parenta76afb7b9298854ebbc2307c1a41adf0b8fb51b9 (diff)
downloadpuppet-5257837ecb85fd37553430fe5e5030d775dbb7bb.tar.gz
puppet-5257837ecb85fd37553430fe5e5030d775dbb7bb.tar.xz
puppet-5257837ecb85fd37553430fe5e5030d775dbb7bb.zip
Fixing #491 -- the client correctly realizes when the cache file is missing and only considers the config to be in sync if that is not the case.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2288 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/network/client')
-rwxr-xr-xtest/network/client/master.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 270c3e08c..593c331ce 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -545,6 +545,28 @@ end
assert(Puppet[:noop], "noop got disabled in run")
end
+
+ # #491 - make sure a missing config doesn't kill us
+ def test_missing_localconfig
+ master = mkclient
+ master.local = false
+ driver = master.send(:instance_variable_get, "@driver")
+ driver.local = false
+ # Retrieve the configuration
+ master.getconfig
+
+ # Now the config is up to date, so get rid of the @objects var and
+ # the cached config
+ master.clear
+ File.unlink(master.cachefile)
+
+ assert_nothing_raised("Missing cache file threw error") do
+ master.getconfig
+ end
+
+ assert(! @logs.detect { |l| l.message =~ /Could not load/},
+ "Tried to load cache when it is non-existent")
+ end
end
# $Id$