summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG4
-rwxr-xr-xtest/network/client/client.rb29
-rwxr-xr-xtest/network/client/master.rb29
-rwxr-xr-xtest/ral/type/tidy.rb13
4 files changed, 39 insertions, 36 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0d3237328..a2d87cff0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+ Moved the configuration of the Node cache to the puppetmasterd
+ executable, since it otherwise causes caches to be used in all
+ cases, which we don't want (e.g., bin/puppet was using them).
+
Ported #198 man page creation functionality to 0.24.x branch and
added man pages and man page creation logic to install.rb. The
man pages are stored in man/man8 and will install to config::CONFIG
diff --git a/test/network/client/client.rb b/test/network/client/client.rb
index b6b915d31..5f96cac11 100755
--- a/test/network/client/client.rb
+++ b/test/network/client/client.rb
@@ -140,35 +140,6 @@ class TestClient < Test::Unit::TestCase
}
end
- def test_classfile
- Puppet[:code] = "class yaytest {}\n class bootest {}\n include yaytest, bootest"
-
- Puppet::Node::Facts.indirection.stubs(:save)
-
- master = client = nil
- assert_nothing_raised() {
- master = Puppet::Network::Handler.master.new(
- :Local => false
- )
- }
- assert_nothing_raised() {
- client = Puppet::Network::Client.master.new(
- :Master => master
- )
- }
-
- # Fake that it's local, so it creates the class file
- client.local = false
-
- # We can't guarantee class ordering
- client.expects(:setclasses).with do |array|
- array.length == 2 and array.include?("yaytest") and array.include?("bootest")
- end
- assert_nothing_raised {
- client.getconfig
- }
- end
-
def test_client_loading
# Make sure we don't get a failure but that we also get nothing back
assert_nothing_raised do
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 28e7b8968..14c7dd852 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -576,4 +576,33 @@ end
# Doesn't throw an exception, but definitely fails.
client.run
end
+
+ def test_classfile
+ Puppet[:code] = "class yaytest {}\n class bootest {}\n include yaytest, bootest"
+
+ Puppet::Node::Facts.indirection.stubs(:save)
+
+ master = client = nil
+ assert_nothing_raised() {
+ master = Puppet::Network::Handler.master.new(
+ :Local => false
+ )
+ }
+ assert_nothing_raised() {
+ client = Puppet::Network::Client.master.new(
+ :Master => master
+ )
+ }
+
+ # Fake that it's local, so it creates the class file
+ client.local = false
+
+ # We can't guarantee class ordering
+ client.expects(:setclasses).with do |array|
+ array.length == 2 and array.include?("yaytest") and array.include?("bootest")
+ end
+ assert_nothing_raised {
+ client.getconfig
+ }
+ end
end
diff --git a/test/ral/type/tidy.rb b/test/ral/type/tidy.rb
index 17f98df22..657ca6e93 100755
--- a/test/ral/type/tidy.rb
+++ b/test/ral/type/tidy.rb
@@ -4,7 +4,6 @@ require File.dirname(__FILE__) + '/../../lib/puppettest'
require 'puppettest'
require 'puppettest/support/utils'
-require 'puppet/type/tidy'
class TestTidy < Test::Unit::TestCase
include PuppetTest::Support::Utils
@@ -76,7 +75,7 @@ class TestTidy < Test::Unit::TestCase
# Test the different age iterations.
def test_age_conversions
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
convertors = {
:second => 1,
@@ -119,7 +118,7 @@ class TestTidy < Test::Unit::TestCase
:gb => 3
}
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
# First make sure we default to kb
assert_nothing_raised do
@@ -149,7 +148,7 @@ class TestTidy < Test::Unit::TestCase
end
def test_agetest
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
age = tidy.property(:age)
@@ -161,7 +160,7 @@ class TestTidy < Test::Unit::TestCase
end
def test_sizetest
- tidy = Puppet::Type.newtidy :path => tempfile(), :size => "1k"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :size => "1k"
size = tidy.property(:size)
@@ -175,7 +174,7 @@ class TestTidy < Test::Unit::TestCase
# Make sure we can remove different types of files
def test_tidytypes
path = tempfile()
- tidy = Puppet::Type.newtidy :path => path, :size => "1b", :age => "1s"
+ tidy = Puppet::Type.type(:tidy).create :path => path, :size => "1b", :age => "1s"
# Start with a file
File.open(path, "w") { |f| f.puts "this is a test" }
@@ -232,7 +231,7 @@ class TestTidy < Test::Unit::TestCase
Dir.mkdir(dir)
File.symlink(target, link)
- tidy = Puppet::Type.newtidy :path => dir, :size => "1b", :recurse => true
+ tidy = Puppet::Type.type(:tidy).create :path => dir, :size => "1b", :recurse => true
assert_apply(tidy)
assert(! FileTest.symlink?(link), "link was not tidied")
end