diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 20:28:45 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 20:28:45 +0000 |
| commit | 343dd08a4ab84bdc6947239e8c514752db219c2a (patch) | |
| tree | 438f144f98a56ef6e35e4c4b670318f15c81eb31 /test/client | |
| parent | 1a93c822667e6990b45f843e56d8976c51517671 (diff) | |
Fixing tests so they do not chmod /dev/null to 640 (stupid tests).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@967 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/client')
| -rw-r--r-- | test/client/client.rb | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/test/client/client.rb b/test/client/client.rb index 659378abd..117d30426 100644 --- a/test/client/client.rb +++ b/test/client/client.rb @@ -150,72 +150,4 @@ class TestClient < Test::Unit::TestCase certbucket.backup("/etc/passwd") } end - - # disabled because the server needs to have its certs in place - # in order to start at all - # i don't think this test makes much sense anyway - def disabled_test_sslInitWithNonsigningLocalServer - Puppet[:autosign] = false - Puppet[:ssldir] = tempfile() - @@tmpfiles.push Puppet[:ssldir] - - file = File.join($puppetbase, "examples", "code", "head") - - server = nil - port = 8086 - assert_nothing_raised { - server = Puppet::Server.new( - :Port => port, - :Handlers => { - :CA => {}, # so that certs autogenerate - :Master => { - :File => file, - }, - } - ) - } - - spid = fork { - trap(:INT) { server.shutdown } - server.start - } - - @@tmppids << spid - client = nil - assert_nothing_raised { - client = Puppet::Client.new(:Server => "localhost", :Port => port) - } - certfile = File.join(Puppet[:certdir], [client.fqdn, "pem"].join(".")) - cafile = File.join(Puppet[:certdir], ["ca", "pem"].join(".")) - assert_nil(client.initcerts) - assert(! File.exists?(certfile)) - - ca = nil - assert_nothing_raised { - ca = Puppet::SSLCertificates::CA.new() - } - - - csr = nil - assert_nothing_raised { - csr = ca.getclientcsr(client.fqdn) - } - - assert(csr) - - cert = nil - assert_nothing_raised { - cert, cacert = ca.sign(csr) - File.open(certfile, "w") { |f| f.print cert.to_pem } - File.open(cafile, "w") { |f| f.print cacert.to_pem } - } - - # this time it should get the cert correctly - assert_nothing_raised { - client.initcerts - } - - # this isn't a very good test, since i just wrote the file out - assert(File.exists?(certfile)) - end end |
