diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 07:30:14 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 07:30:14 +0000 |
commit | 95856eaaf02361ff597ca2c85e51cf141fe81280 (patch) | |
tree | db31ba74ce65523fa9dcd4d1cae0cd75c55a4395 /test/client | |
parent | ff1df8e1aef99dbdc222c5d5d808494fd08e7f83 (diff) | |
download | puppet-95856eaaf02361ff597ca2c85e51cf141fe81280.tar.gz puppet-95856eaaf02361ff597ca2c85e51cf141fe81280.tar.xz puppet-95856eaaf02361ff597ca2c85e51cf141fe81280.zip |
Okay, Puppet is now almost entirely capable of configuring itself. I have not yet added the extra tests to puppetmasterd to make sure it can start as a normal user, and the executables still fail some simple tests because they are producing output when they start (I will get rid of the output), but overall things look pretty good.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@965 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/client')
-rw-r--r-- | test/client/client.rb | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/test/client/client.rb b/test/client/client.rb index 3a462c097..659378abd 100644 --- a/test/client/client.rb +++ b/test/client/client.rb @@ -83,9 +83,12 @@ class TestClient < Test::Unit::TestCase } # create a ca so we can create a set of certs + # make a new ssldir for it ca = nil assert_nothing_raised { - ca = Puppet::Client::CAClient.new(:CA => true, :Local => true) + ca = Puppet::Client::CAClient.new( + :CA => true, :Local => true + ) ca.requestcert } @@ -107,9 +110,24 @@ class TestClient < Test::Unit::TestCase } # clean up the existing certs, so the server creates a new CA - system("rm -rf %s" % Puppet[:ssldir]) + #system("rm -rf %s" % Puppet[:ssldir]) + confdir = tempfile() + Puppet[:confdir] = confdir + + # Now we need to recreate the directory structure + [:certificates, :ca].each { |section| + Puppet.config.params(section).each { |param| + val = Puppet[param] + if val =~ /^#{File::SEPARATOR}/ + if param.to_s =~ /dir/ + Puppet::Util.recmkdir(val) + else + Puppet::Util.recmkdir(File.dirname(val)) + end + end + } + } - # start our server mkserver # now verify that our client cannot do non-cert operations |