diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-04 23:13:55 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-04 23:13:55 +0000 |
commit | e8c04716b2e3ef348848d85ed88c886bd43d95df (patch) | |
tree | f2b813830ba9e43d2a63f95110b0aa72d6809c0f | |
parent | 92302895549800d9d8384b2cc77f9b5bb4dc1fd1 (diff) | |
download | puppet-e8c04716b2e3ef348848d85ed88c886bd43d95df.tar.gz puppet-e8c04716b2e3ef348848d85ed88c886bd43d95df.tar.xz puppet-e8c04716b2e3ef348848d85ed88c886bd43d95df.zip |
Fixing a couple of bugs in preparation for 0.15.2; mostly they were in the testing system and resulted from changing :File to :Manifest in server/master
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1068 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | lib/puppet/client.rb | 4 | ||||
-rw-r--r-- | test/client/client.rb | 7 | ||||
-rw-r--r-- | test/client/master.rb | 2 | ||||
-rwxr-xr-x | test/language/snippets.rb | 2 | ||||
-rwxr-xr-x | test/other/filetype.rb | 1 | ||||
-rw-r--r-- | test/puppettest.rb | 2 | ||||
-rw-r--r-- | test/server/master.rb | 6 | ||||
-rw-r--r-- | test/server/server.rb | 2 | ||||
-rwxr-xr-x | test/types/mount.rb | 44 |
9 files changed, 37 insertions, 33 deletions
diff --git a/lib/puppet/client.rb b/lib/puppet/client.rb index f0f0968bf..200834dc5 100644 --- a/lib/puppet/client.rb +++ b/lib/puppet/client.rb @@ -15,8 +15,8 @@ module Puppet # should be in the network client, not the normal client. But if i do # that, it's hard to tell whether the certs have been initialized. include Puppet::Daemon - attr_reader :local, :secureinit - attr_accessor :schedule, :lastrun + attr_reader :secureinit + attr_accessor :schedule, :lastrun, :local class << self attr_reader :drivername diff --git a/test/client/client.rb b/test/client/client.rb index c96feb943..41d55dab2 100644 --- a/test/client/client.rb +++ b/test/client/client.rb @@ -149,9 +149,9 @@ class TestClient < Test::Unit::TestCase master = client = nil assert_nothing_raised() { master = Puppet::Server::Master.new( - :File => manifest, + :Manifest => manifest, :UseNodes => false, - :Local => true + :Local => false ) } assert_nothing_raised() { @@ -160,6 +160,9 @@ class TestClient < Test::Unit::TestCase ) } + # Fake that it's local, so it creates the class file + client.local = false + assert_nothing_raised { client.getconfig } diff --git a/test/client/master.rb b/test/client/master.rb index 7ec440cc6..11d49ac85 100644 --- a/test/client/master.rb +++ b/test/client/master.rb @@ -21,7 +21,7 @@ class TestMasterClient < Test::Unit::TestCase assert_nothing_raised() { # this is the default server setup master = Puppet::Server::Master.new( - :File => file, + :Manifest => file, :UseNodes => false, :Local => true ) diff --git a/test/language/snippets.rb b/test/language/snippets.rb index a4090e7d2..220c50511 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -448,7 +448,7 @@ class TestSnippets < Test::Unit::TestCase self.send(:define_method, testname) { # first parse the file server = Puppet::Server::Master.new( - :File => File.join($snippetbase, file), + :Manifest => File.join($snippetbase, file), :Local => true ) client = Puppet::Client::MasterClient.new( diff --git a/test/other/filetype.rb b/test/other/filetype.rb index b965ade39..e16ffd86e 100755 --- a/test/other/filetype.rb +++ b/test/other/filetype.rb @@ -86,7 +86,6 @@ class TestFileType < Test::Unit::TestCase array.each do |record| assert_instance_of(Hash, record) assert(record.length != 0) - p record end end end diff --git a/test/puppettest.rb b/test/puppettest.rb index cb3606e61..c7b7df2c4 100644 --- a/test/puppettest.rb +++ b/test/puppettest.rb @@ -343,7 +343,7 @@ module ServerTest handlers = { :CA => {}, # so that certs autogenerate :Master => { - :File => mktestmanifest(), + :Manifest => mktestmanifest(), :UseNodes => false }, } diff --git a/test/server/master.rb b/test/server/master.rb index 4ece12a87..bd097a007 100644 --- a/test/server/master.rb +++ b/test/server/master.rb @@ -34,7 +34,7 @@ class TestMaster < Test::Unit::TestCase assert_nothing_raised() { # this is the default server setup master = Puppet::Server::Master.new( - :File => file, + :Manifest => file, :UseNodes => false, :Local => true ) @@ -79,7 +79,7 @@ class TestMaster < Test::Unit::TestCase assert_nothing_raised() { # this is the default server setup master = Puppet::Server::Master.new( - :File => file, + :Manifest => file, :UseNodes => false, :Local => true ) @@ -111,7 +111,7 @@ class TestMaster < Test::Unit::TestCase assert_nothing_raised() { # this is the default server setup master = Puppet::Server::Master.new( - :File => manifest, + :Manifest => manifest, :UseNodes => false, :Local => true, :FileTimeout => 15 diff --git a/test/server/server.rb b/test/server/server.rb index 89ba01b4d..2c3489fb5 100644 --- a/test/server/server.rb +++ b/test/server/server.rb @@ -85,7 +85,7 @@ class TestServer < Test::Unit::TestCase :CA => {}, # so that certs autogenerate :Master => { :UseNodes => false, - :File => file + :Manifest => file }, :Status => nil } diff --git a/test/types/mount.rb b/test/types/mount.rb index 64bfa9300..9f236cfa6 100755 --- a/test/types/mount.rb +++ b/test/types/mount.rb @@ -34,7 +34,7 @@ class TestMounts < Test::Unit::TestCase @mounttype.filetype = Puppet::FileType.filetype(:ram) cleanup do - @mounttype.path = old + @mounttype.filetype = old @mounttype.fileobj = nil end @@ -91,30 +91,32 @@ class TestMounts < Test::Unit::TestCase } end - def test_mountsparse - assert_nothing_raised { - @mounttype.retrieve - } + unless Facter["operatingsystem"].value == "Darwin" + def test_mountsparse + assert_nothing_raised { + @mounttype.retrieve + } - # Now just make we've got some mounts we know will be there - root = @mounttype["/"] - assert(root, "Could not retrieve root mount") - end + # Now just make we've got some mounts we know will be there + root = @mounttype["/"] + assert(root, "Could not retrieve root mount") + end - def test_rootfs - fs = nil - assert_nothing_raised { - Puppet.type(:mount).retrieve - } + def test_rootfs + fs = nil + assert_nothing_raised { + Puppet.type(:mount).retrieve + } - assert_nothing_raised { - fs = Puppet.type(:mount)["/"] - } - assert(fs, "Could not retrieve root fs") + assert_nothing_raised { + fs = Puppet.type(:mount)["/"] + } + assert(fs, "Could not retrieve root fs") - assert_nothing_raised { - assert(fs.mounted?, "Root is considered not mounted") - } + assert_nothing_raised { + assert(fs.mounted?, "Root is considered not mounted") + } + end end # Make sure it reads and writes correctly. |