summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/client.rb4
-rw-r--r--test/client/client.rb7
-rw-r--r--test/client/master.rb2
-rwxr-xr-xtest/language/snippets.rb2
-rwxr-xr-xtest/other/filetype.rb1
-rw-r--r--test/puppettest.rb2
-rw-r--r--test/server/master.rb6
-rw-r--r--test/server/server.rb2
-rwxr-xr-xtest/types/mount.rb44
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.