From 68ff8d8b43ec3b4749923a81d1080284a260de75 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 13 Feb 2019 21:51:21 -0800 Subject: [PATCH] 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 --- test/cookbooks/os_prepare/recipes/x509.rb | 2 +- test/integration/default/controls/x509_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cookbooks/os_prepare/recipes/x509.rb b/test/cookbooks/os_prepare/recipes/x509.rb index 694875060..3895ebb14 100644 --- a/test/cookbooks/os_prepare/recipes/x509.rb +++ b/test/cookbooks/os_prepare/recipes/x509.rb @@ -1,6 +1,6 @@ if node['platform_family'] != 'windows' - openssl_x509_request '/tmp/mycert.pem' do + openssl_x509_certificate '/tmp/mycert.pem' do common_name 'www.f00bar.com' org 'Foo Bar' org_unit 'Lab' diff --git a/test/integration/default/controls/x509_spec.rb b/test/integration/default/controls/x509_spec.rb index 6367c6e6c..f19645243 100644 --- a/test/integration/default/controls/x509_spec.rb +++ b/test/integration/default/controls/x509_spec.rb @@ -11,9 +11,9 @@ describe x509_certificate('/tmp/mycert.pem') do its('signature_algorithm') { should eq 'sha256WithRSAEncryption' } its('validity_in_days') { should_not 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('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 } end