Sha256: 1a8bdacaa1efdff1f82c67af749060f692a624fd327425faf2b6e162ed1bf0a6

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

#!/usr/bin/env ruby
#
#  Created by Luke Kanies on 2008-5-5.
#  Copyright (c) 2008. All rights reserved.

require File.dirname(__FILE__) + '/../../spec_helper'

require 'puppet/ssl/certificate_revocation_list'
require 'tempfile'

describe Puppet::SSL::CertificateRevocationList do
    before do
        # Get a safe temporary file
        file = Tempfile.new("ca_integration_testing")
        @dir = file.path
        file.delete

        Puppet.settings[:confdir] = @dir
        Puppet.settings[:vardir] = @dir

        Puppet::SSL::Host.ca_location = :local
    end

    after {
        Puppet::SSL::Host.ca_location = :none

        system("rm -rf %s" % @dir)
        Puppet.settings.clear

        # This is necessary so the terminus instances don't lie around.
        Puppet::Util::Cacher.expire
    }

    it "should be able to read in written out CRLs with no revoked certificates" do
        ca = Puppet::SSL::CertificateAuthority.new

        raise "CRL not created" unless FileTest.exist?(Puppet[:hostcrl])

        crl = Puppet::SSL::CertificateRevocationList.new("crl_int_testing")
        crl.read(Puppet[:hostcrl])
    end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-0.25.5 spec/integration/ssl/certificate_revocation_list.rb
puppet-0.25.4 spec/integration/ssl/certificate_revocation_list.rb
puppet-0.25.3 spec/integration/ssl/certificate_revocation_list.rb
puppet-0.25.2 spec/integration/ssl/certificate_revocation_list.rb
puppet-0.25.1 spec/integration/ssl/certificate_revocation_list.rb
puppet-0.25.0 spec/integration/ssl/certificate_revocation_list.rb