Update what we expect for the x509 request

The new built in chef resource creates it a bit differently than the legacy cookbook resource did

Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
Tim Smith 2019-02-13 21:51:21 -08:00
parent 4b3095dac2
commit 68ff8d8b43
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
if node['platform_family'] != 'windows' if node['platform_family'] != 'windows'
openssl_x509_request '/tmp/mycert.pem' do openssl_x509_certificate '/tmp/mycert.pem' do
common_name 'www.f00bar.com' common_name 'www.f00bar.com'
org 'Foo Bar' org 'Foo Bar'
org_unit 'Lab' org_unit 'Lab'

View file

@ -11,9 +11,9 @@ describe x509_certificate('/tmp/mycert.pem') do
its('signature_algorithm') { should eq 'sha256WithRSAEncryption' } its('signature_algorithm') { should eq 'sha256WithRSAEncryption' }
its('validity_in_days') { should_not be < 100 } its('validity_in_days') { should_not be < 100 }
its('validity_in_days') { should be >= 100 } its('validity_in_days') { should be >= 100 }
its('subject_dn') { should eq '/C=US/ST= /L= /O=Foo Bar/OU=Lab/CN=www.f00bar.com' } its('subject_dn') { should eq '/C=US/O=Foo Bar/OU=Lab/CN=www.f00bar.com' }
its('subject.C') { should eq 'US' } its('subject.C') { should eq 'US' }
its('issuer_dn') { should eq '/C=US/ST= /L= /O=Foo Bar/OU=Lab/CN=www.f00bar.com' } its('issuer_dn') { should eq '/C=US/O=Foo Bar/OU=Lab/CN=www.f00bar.com' }
its('key_length') { should be >= 2048 } its('key_length') { should be >= 2048 }
end end