summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/certmgr/certmgr.rb8
-rwxr-xr-xtest/certmgr/inventory.rb4
-rwxr-xr-xtest/lib/puppettest.rb4
-rwxr-xr-xtest/network/client/ca.rb2
-rwxr-xr-xtest/network/client/client.rb6
-rwxr-xr-xtest/network/client/master.rb2
-rwxr-xr-xtest/network/handler/master.rb2
-rwxr-xr-xtest/other/report.rb4
-rwxr-xr-xtest/puppet/conffiles.rb5
-rwxr-xr-xtest/util/settings.rb (renamed from test/util/config.rb)18
10 files changed, 27 insertions, 28 deletions
diff --git a/test/certmgr/certmgr.rb b/test/certmgr/certmgr.rb
index fb1611d7f..3d863dc27 100755
--- a/test/certmgr/certmgr.rb
+++ b/test/certmgr/certmgr.rb
@@ -239,13 +239,13 @@ class TestCertMgr < Test::Unit::TestCase
ca.revoke(h1.serial)
- oldcert = File.read(Puppet.config[:cacert])
- oldserial = File.read(Puppet.config[:serial])
+ oldcert = File.read(Puppet.settings[:cacert])
+ oldserial = File.read(Puppet.settings[:serial])
# Recreate the CA from disk
ca = mkCA()
- newcert = File.read(Puppet.config[:cacert])
- newserial = File.read(Puppet.config[:serial])
+ newcert = File.read(Puppet.settings[:cacert])
+ newserial = File.read(Puppet.settings[:serial])
assert_equal(oldcert, newcert, "The certs are not equal after making a new CA.")
assert_equal(oldserial, newserial, "The serials are not equal after making a new CA.")
store = mkStore(ca)
diff --git a/test/certmgr/inventory.rb b/test/certmgr/inventory.rb
index 15d3e5217..9efcb0c09 100755
--- a/test/certmgr/inventory.rb
+++ b/test/certmgr/inventory.rb
@@ -56,8 +56,8 @@ class TestCertInventory < Test::Unit::TestCase
file.expects(:puts).with do |written|
written.include? cert.subject.to_s
end
- Puppet::Util::Config.any_instance.stubs(:write)
- Puppet::Util::Config.any_instance.expects(:write).
+ Puppet::Util::Settings.any_instance.stubs(:write)
+ Puppet::Util::Settings.any_instance.expects(:write).
with(:cert_inventory, 'a').yields(file)
Puppet::SSLCertificates::Inventory.add(cert)
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 33e3b2daf..021d6d1de 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -154,7 +154,7 @@ module PuppetTest
$group = nonrootgroup().gid.to_s
end
- Puppet.config.clear
+ Puppet.settings.clear
Puppet[:user] = $user
Puppet[:group] = $group
@@ -264,7 +264,7 @@ module PuppetTest
Puppet::Type.allclear
Puppet::Util::Storage.clear
Puppet.clear
- Puppet.config.clear
+ Puppet.settings.clear
Puppet::Indirector::Indirection.clear_cache
@memoryatend = Puppet::Util.memory
diff --git a/test/network/client/ca.rb b/test/network/client/ca.rb
index 00ed7413a..511b6fcaa 100755
--- a/test/network/client/ca.rb
+++ b/test/network/client/ca.rb
@@ -23,7 +23,7 @@ class TestClientCA < Test::Unit::TestCase
end
[:hostprivkey, :hostcert, :localcacert].each do |name|
- assert(FileTest.exists?(Puppet.config[name]),
+ assert(FileTest.exists?(Puppet.settings[name]),
"Did not create cert %s" % name)
end
end
diff --git a/test/network/client/client.rb b/test/network/client/client.rb
index 93c63d637..382cd55cf 100755
--- a/test/network/client/client.rb
+++ b/test/network/client/client.rb
@@ -113,9 +113,9 @@ class TestClient < Test::Unit::TestCase
# Create a new ssl root.
confdir = tempfile()
Puppet[:ssldir] = confdir
- Puppet.config.mkdir(:ssldir)
- Puppet.config.clearused
- Puppet.config.use(:ssl, :ca)
+ Puppet.settings.mkdir(:ssldir)
+ Puppet.settings.clearused
+ Puppet.settings.use(:ssl, :ca)
mkserver
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 2e9ed2752..169a1de5f 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -680,7 +680,7 @@ end
client.apply
# Make sure the config is not cached.
- config = Puppet.config[:localconfig] + ".yaml"
+ config = Puppet.settings[:localconfig] + ".yaml"
assert(! File.exists?(config), "Cached an invalid configuration")
end
end
diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb
index df946fa33..4f8e7fab2 100755
--- a/test/network/handler/master.rb
+++ b/test/network/handler/master.rb
@@ -75,7 +75,7 @@ class TestMaster < Test::Unit::TestCase
assert(! client.fresh?(facts),
"Client is incorrectly up to date")
- Puppet.config.use(:main)
+ Puppet.settings.use(:main)
config = nil
assert_nothing_raised {
config = client.getconfig
diff --git a/test/other/report.rb b/test/other/report.rb
index 7499c51e2..3de2dfbee 100755
--- a/test/other/report.rb
+++ b/test/other/report.rb
@@ -86,7 +86,7 @@ class TestReports < Test::Unit::TestCase
# We have to reuse reporting here because of something going on in the
# server/report.rb file
- Puppet.config.use(:reporting)
+ Puppet.settings.use(:reporting)
3.times { |i|
log = Puppet.warning("Report test message %s" % i)
@@ -113,7 +113,7 @@ class TestReports < Test::Unit::TestCase
if Puppet.features.rrd?
def test_rrdgraph_report
- Puppet.config.use(:metrics)
+ Puppet.settings.use(:metrics)
report = mkreport
assert(! report.metrics.empty?, "Did not receive any metrics")
diff --git a/test/puppet/conffiles.rb b/test/puppet/conffiles.rb
index 3dfa53a13..1800c80f6 100755
--- a/test/puppet/conffiles.rb
+++ b/test/puppet/conffiles.rb
@@ -3,7 +3,6 @@
$:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/
require 'puppettest'
-require 'puppet/util/config'
class TestConfFiles < Test::Unit::TestCase
include PuppetTest
@@ -72,7 +71,7 @@ class TestConfFiles < Test::Unit::TestCase
path = tempfile()
sampledata { |data|
- config = Puppet::Util::Config.new
+ config = Puppet::Util::Settings.new
data.each { |section, hash|
hash.each { |param, value|
config.setdefaults(section, param => [value, value])
@@ -100,7 +99,7 @@ class TestConfFiles < Test::Unit::TestCase
# that the default config is free of simple typos etc.
def test_genconfig
assert_nothing_raised {
- Puppet::config::to_config
+ Puppet::settings::to_config
}
end
diff --git a/test/util/config.rb b/test/util/settings.rb
index cbd02b4f9..62f34fda6 100755
--- a/test/util/config.rb
+++ b/test/util/settings.rb
@@ -4,14 +4,14 @@ $:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/
require 'mocha'
require 'puppettest'
-require 'puppet/util/config'
+require 'puppet/util/settings'
require 'puppettest/parsertesting'
-class TestConfig < Test::Unit::TestCase
+class TestSettings < Test::Unit::TestCase
include PuppetTest
include PuppetTest::ParserTesting
- CElement = Puppet::Util::Config::CElement
- CBoolean = Puppet::Util::Config::CBoolean
+ CElement = Puppet::Util::Settings::CElement
+ CBoolean = Puppet::Util::Settings::CBoolean
def setup
super
@@ -95,7 +95,7 @@ class TestConfig < Test::Unit::TestCase
def mkconfig
c = nil
assert_nothing_raised {
- c = Puppet::Util::Config.new
+ c = Puppet::Util::Settings.new
}
return c
end
@@ -768,15 +768,15 @@ yay = /a/path
}
assert_equal("http://yayness/rahness", val,
- "Config got messed up")
+ "Settings got messed up")
end
def test_correct_type_assumptions
config = mkconfig
- file = Puppet::Util::Config::CFile
- element = Puppet::Util::Config::CElement
- bool = Puppet::Util::Config::CBoolean
+ file = Puppet::Util::Settings::CFile
+ element = Puppet::Util::Settings::CElement
+ bool = Puppet::Util::Settings::CBoolean
# We have to keep these ordered, unfortunately.
[