~nvalcarcel/ubuntu/lucid/puppet/fix-546677

« back to all changes in this revision

Viewing changes to test/certmgr/certmgr.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
        assert_equal($?,0)
165
165
        assert_equal(File.join(Puppet[:certdir], "signedcertest.pem: OK\n"), output)
166
166
    end
167
 
 
 
167
 
168
168
 
169
169
    def test_interactiveca
170
170
        ca = nil
224
224
        ca = mkCA()
225
225
        h1 = mksignedcert(ca, "host1.example.com")
226
226
        h2 = mksignedcert(ca, "host2.example.com")
227
 
        
 
227
 
228
228
        assert(ca.cert.verify(ca.cert.public_key))
229
229
        assert(h1.verify(ca.cert.public_key))
230
230
        assert(h2.verify(ca.cert.public_key))
231
231
 
232
232
        crl = ca.crl
233
233
        assert_not_nil(crl)
234
 
        
 
234
 
235
235
        store = mkStore(ca)
236
236
        assert( store.verify(ca.cert))
237
237
        assert( store.verify(h1, [ca.cert]))
252
252
        assert( store.verify(ca.cert), "Could not verify CA certs after reloading certs.")
253
253
        assert(!store.verify(h1, [ca.cert]), "Incorrectly verified revoked cert.")
254
254
        assert( store.verify(h2, [ca.cert]), "Could not verify certs with reloaded CA.")
255
 
        
 
255
 
256
256
        ca.revoke(h2.serial)
257
257
        assert_equal(1, ca.crl.extensions.size)
258
258