From ca88a47c22dc186a51f3e6bdcf946762de86c93b Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Tue, 23 Apr 2024 13:10:31 -0400 Subject: [PATCH] Fix tests on EL9 (cherry picked from commit d7e8d4e981036ef5d237f708a5a5b48d69edc470) --- spec/acceptance/apache_spec.rb | 16 +++++----- spec/acceptance/candlepin_spec.rb | 20 ++++++------ spec/acceptance/certs_spec.rb | 24 +++++++-------- spec/acceptance/certs_tar_extract_spec.rb | 8 ++--- spec/acceptance/foreman_proxy_spec.rb | 36 +++++++++++----------- spec/acceptance/foreman_spec.rb | 16 +++++----- spec/acceptance/puppet_spec.rb | 16 +++++----- spec/acceptance/qpid_router_client_spec.rb | 12 ++++---- spec/acceptance/qpid_router_server_spec.rb | 12 ++++---- 9 files changed, 80 insertions(+), 80 deletions(-) diff --git a/spec/acceptance/apache_spec.rb b/spec/acceptance/apache_spec.rb index 1630b626..1817bb0d 100644 --- a/spec/acceptance/apache_spec.rb +++ b/spec/acceptance/apache_spec.rb @@ -19,8 +19,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -34,8 +34,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -77,8 +77,8 @@ class { '::certs::apache': it { should be_certificate } # Doesn't have to be valid - can be expired since it's a static resource it { should have_purpose 'server' } - its(:issuer) { should eq('CN = Fake LE Intermediate X1') } - its(:subject) { should eq('CN = example.partial.solutions') } + its(:issuer) { should match_without_whitespace(/CN = Fake LE Intermediate X1/) } + its(:subject) { should match_without_whitespace(/CN = example.partial.solutions/) } its(:keylength) { should be >= 2048 } end @@ -112,8 +112,8 @@ class { 'certs::apache': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/candlepin_spec.rb b/spec/acceptance/candlepin_spec.rb index e1611450..1c5e044a 100644 --- a/spec/acceptance/candlepin_spec.rb +++ b/spec/acceptance/candlepin_spec.rb @@ -50,8 +50,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -77,8 +77,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -113,8 +113,8 @@ describe x509_certificate('/etc/foreman/proxy_ca.pem') do it { should be_certificate } it { should be_valid } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -208,8 +208,8 @@ class { 'certs::candlepin': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq('C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = localhost') } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = localhost/) } its(:keylength) { should be >= 4096 } end @@ -322,8 +322,8 @@ class { 'certs::candlepin': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/certs_spec.rb b/spec/acceptance/certs_spec.rb index e61c9ea0..c644a20b 100644 --- a/spec/acceptance/certs_spec.rb +++ b/spec/acceptance/certs_spec.rb @@ -18,8 +18,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'SSL server CA' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -27,8 +27,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'SSL server CA' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -40,8 +40,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'SSL server CA' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -49,8 +49,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'SSL server CA' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -94,8 +94,8 @@ class { 'certs': it { should be_certificate } it { should be_valid } it { should have_purpose 'SSL server CA' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end @@ -103,8 +103,8 @@ class { 'certs': it { should be_certificate } it { should be_valid } it { should have_purpose 'SSL server CA' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/certs_tar_extract_spec.rb b/spec/acceptance/certs_tar_extract_spec.rb index 124c8982..5416108a 100644 --- a/spec/acceptance/certs_tar_extract_spec.rb +++ b/spec/acceptance/certs_tar_extract_spec.rb @@ -45,8 +45,8 @@ class { 'certs': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = foreman-proxy.example.com") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = foreman-proxy.example.com/) } its(:keylength) { should be >= 4096 } end @@ -60,8 +60,8 @@ class { 'certs': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = foreman-proxy.example.com") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = foreman-proxy.example.com/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/foreman_proxy_spec.rb b/spec/acceptance/foreman_proxy_spec.rb index 26fbc5c5..fc298201 100644 --- a/spec/acceptance/foreman_proxy_spec.rb +++ b/spec/acceptance/foreman_proxy_spec.rb @@ -28,8 +28,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -57,8 +57,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -66,8 +66,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -95,8 +95,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -104,8 +104,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -119,8 +119,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -134,8 +134,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -181,8 +181,8 @@ class { 'certs::foreman_proxy': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -196,8 +196,8 @@ class { 'certs::foreman_proxy': it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = FOREMAN_PROXY, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/foreman_spec.rb b/spec/acceptance/foreman_spec.rb index 039bf71e..ea904a19 100644 --- a/spec/acceptance/foreman_spec.rb +++ b/spec/acceptance/foreman_spec.rb @@ -26,8 +26,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -54,8 +54,8 @@ describe x509_certificate('/etc/foreman/proxy_ca.pem') do it { should be_certificate } it { should be_valid } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -70,8 +70,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -105,8 +105,8 @@ class { 'certs::foreman': it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/puppet_spec.rb b/spec/acceptance/puppet_spec.rb index eb54c8a3..92600e82 100644 --- a/spec/acceptance/puppet_spec.rb +++ b/spec/acceptance/puppet_spec.rb @@ -24,8 +24,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -52,8 +52,8 @@ describe x509_certificate('/etc/pki/katello/puppet/puppet_client_ca.crt') do it { should be_certificate } it { should be_valid } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -68,8 +68,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -103,8 +103,8 @@ class { 'certs::puppet': it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = PUPPET, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/qpid_router_client_spec.rb b/spec/acceptance/qpid_router_client_spec.rb index 378108d4..143e9a12 100644 --- a/spec/acceptance/qpid_router_client_spec.rb +++ b/spec/acceptance/qpid_router_client_spec.rb @@ -24,8 +24,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = dispatch client, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = dispatch client, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -53,8 +53,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = dispatch client, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = dispatch client, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -88,8 +88,8 @@ class { 'certs::qpid_router::client': it { should be_certificate } it { should be_valid } it { should have_purpose 'client' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = dispatch client, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = dispatch client, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end diff --git a/spec/acceptance/qpid_router_server_spec.rb b/spec/acceptance/qpid_router_server_spec.rb index d525b724..0f21f70c 100644 --- a/spec/acceptance/qpid_router_server_spec.rb +++ b/spec/acceptance/qpid_router_server_spec.rb @@ -24,8 +24,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = dispatch server, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = dispatch server, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -53,8 +53,8 @@ it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = dispatch server, OU = SomeOrgUnit, CN = #{fqdn}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = dispatch server, OU = SomeOrgUnit, CN = #{fqdn}/) } its(:keylength) { should be >= 4096 } end @@ -88,8 +88,8 @@ class { 'certs::qpid_router::server': it { should be_certificate } it { should be_valid } it { should have_purpose 'server' } - its(:issuer) { should eq("C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } - its(:subject) { should eq("C = US, ST = North Carolina, O = dispatch server, OU = SomeOrgUnit, CN = #{fact('fqdn')}") } + its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } + its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = dispatch server, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) } its(:keylength) { should be >= 4096 } end