summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/certmgr/certmgr.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/test/certmgr/certmgr.rb b/test/certmgr/certmgr.rb
index c0ec7c934..d9f2c4812 100755
--- a/test/certmgr/certmgr.rb
+++ b/test/certmgr/certmgr.rb
@@ -23,10 +23,11 @@ require 'puppettest'
class TestCertMgr < Test::Unit::TestCase
include TestPuppet
def setup
- Puppet[:loglevel] = :debug if __FILE__ == $0
+ super
#@dir = File.join(Puppet[:certdir], "testing")
+ @dir = File.join(@configpath, "certest")
+ Puppet.notice @dir
system("mkdir -p %s" % @dir)
- @@tmpfiles = [@dir]
end
def mkPassFile()
@@ -44,7 +45,6 @@ class TestCertMgr < Test::Unit::TestCase
def mkCA
ca = nil
- Puppet[:ssldir] = @dir
assert_nothing_raised {
ca = Puppet::SSLCertificates::CA.new()
}
@@ -52,14 +52,6 @@ class TestCertMgr < Test::Unit::TestCase
return ca
end
- def teardown
- @@tmpfiles.each { |f|
- if FileTest.exists?(f)
- system("rm -rf %s" % f)
- end
- }
- end
-
def testCreateSelfSignedCertificate
cert = nil
name = "testing"
@@ -203,7 +195,7 @@ class TestCertMgr < Test::Unit::TestCase
}
assert_equal($?,0)
- assert_equal("/tmp/puppetcertestingdir/certs/signedcertest.pem: OK\n", output)
+ assert_equal(File.join(Puppet[:certdir], "signedcertest.pem: OK\n"), output)
end
def mkcert(hostname)