diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-29 22:49:55 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-29 22:49:55 +0000 |
commit | d3fc49dd9b15199472db26d52c5c6e3593014359 (patch) | |
tree | 22605e260a1dcedcfb115163169431b8bbfc3019 /test/client/master.rb | |
parent | 6c61f0cc1c3607cd61215c73aaa2cc9c13386f8b (diff) | |
download | puppet-d3fc49dd9b15199472db26d52c5c6e3593014359.tar.gz puppet-d3fc49dd9b15199472db26d52c5c6e3593014359.tar.xz puppet-d3fc49dd9b15199472db26d52c5c6e3593014359.zip |
Fixing a problem that occurs when puppetd starts with an up-to-date configuration -- the default schedules and filebucket were not being created.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2115 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/client/master.rb')
-rwxr-xr-x | test/client/master.rb | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/test/client/master.rb b/test/client/master.rb index 41e2df111..8a7bf4f8b 100755 --- a/test/client/master.rb +++ b/test/client/master.rb @@ -160,9 +160,6 @@ class TestMasterClient < Test::Unit::TestCase assert($methodsrun.include?(method), "method %s was not run" % method) end assert(! $methodsrun.include?(:getplugins), "plugins were synced even tho disabled") - # Make sure we've got schedules - assert(Puppet::Type.type(:schedule)["hourly"], "Could not retrieve hourly schedule") - assert(Puppet::Type.type(:filebucket)["puppet"], "Could not retrieve default bucket") # Now set pluginsync Puppet[:pluginsync] = true @@ -498,6 +495,39 @@ end assert_equal(time, master.compile_time, "time was not retrieved from cache") assert(FileTest.exists?(file), "file was not created on second run") end + + def test_default_objects + # Make sure they start out missing + assert_nil(Puppet::Type.type(:filebucket)["puppet"], + "default filebucket already exists") + assert_nil(Puppet::Type.type(:schedule)["daily"], + "default schedules already exists") + + master = mkclient() + + # Now make sure they got created + assert(Puppet::Type.type(:filebucket)["puppet"], + "default filebucket not found") + assert(Puppet::Type.type(:schedule)["daily"], + "default schedules not found") + + # clear everything, and make sure we can recreate them + Puppet::Type.allclear + assert_nil(Puppet::Type.type(:filebucket)["puppet"], + "default filebucket not removed") + assert_nil(Puppet::Type.type(:schedule)["daily"], + "default schedules not removed") + assert_nothing_raised { master.mkdefault_objects } + assert(Puppet::Type.type(:filebucket)["puppet"], + "default filebucket not found") + assert(Puppet::Type.type(:schedule)["daily"], + "default schedules not found") + + + # Make sure we've got schedules + assert(Puppet::Type.type(:schedule)["hourly"], "Could not retrieve hourly schedule") + assert(Puppet::Type.type(:filebucket)["puppet"], "Could not retrieve default bucket") + end end # $Id$ |