From 491a1b996842dcfd494b6d9a7df7d7b9c05c461c Mon Sep 17 00:00:00 2001 From: Jerry Aldrich Date: Tue, 2 Jan 2018 11:27:30 -0600 Subject: [PATCH] Fix `x509_certificate` integration tests (#2431) An update to the openssl cookbook modified the defaults for `state` and `city` in the `openssl_x509` resource. That change modified the output of `issuer_dn` and `subject_dn` in InSpec's `x509_certificate` resource. This modifies the expected output of the integration tests to match these new defaults. Signed-off-by: Jerry Aldrich --- test/integration/default/controls/x509_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/default/controls/x509_spec.rb b/test/integration/default/controls/x509_spec.rb index f19645243..6367c6e6c 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/O=Foo Bar/OU=Lab/CN=www.f00bar.com' } + its('subject_dn') { should eq '/C=US/ST= /L= /O=Foo Bar/OU=Lab/CN=www.f00bar.com' } its('subject.C') { should eq 'US' } - its('issuer_dn') { should eq '/C=US/O=Foo Bar/OU=Lab/CN=www.f00bar.com' } + its('issuer_dn') { should eq '/C=US/ST= /L= /O=Foo Bar/OU=Lab/CN=www.f00bar.com' } its('key_length') { should be >= 2048 } end