Skip to content

Commit

Permalink
acceptance tests: use 1024 bit keys
Browse files Browse the repository at this point in the history
This is way faster to generate compared to the default 3072. Otherwise
our CI runs for ages.
  • Loading branch information
bastelfreak committed Jul 18, 2024
1 parent ea4c129 commit c7e137a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/x509_cert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
base_dir => '/tmp',
owner => 'nobody',
password => 'mahje1Qu',
keysize => 1024,
}
2 changes: 1 addition & 1 deletion spec/acceptance/x509_cert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
it { is_expected.to be_certificate }

Check failure on line 15 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - AlmaLinux 8

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" is expected to be certificate Failure/Error: it { is_expected.to be_certificate } expected `X509 certificate "/tmp/foo.example.com.crt".certificate?` to be truthy, got false Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10

Check failure on line 15 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Distro Puppet - Archlinux rolling

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" is expected to be certificate Failure/Error: it { is_expected.to be_certificate } expected `X509 certificate "/tmp/foo.example.com.crt".certificate?` to be truthy, got false Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10
it { is_expected.to be_valid }

Check failure on line 16 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - AlmaLinux 8

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" is expected to be valid Failure/Error: it { is_expected.to be_valid } expected `X509 certificate "/tmp/foo.example.com.crt".valid?` to be truthy, got false Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10

Check failure on line 16 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Distro Puppet - Archlinux rolling

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" is expected to be valid Failure/Error: it { is_expected.to be_valid } expected `X509 certificate "/tmp/foo.example.com.crt".valid?` to be truthy, got false Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10
its(:subject) { is_expected.to match_without_whitespace(%r{C = CH, O = Example.com, CN = foo.example.com}) }

Check failure on line 17 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - AlmaLinux 8

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" subject is expected to match without whitespace /C = CH, O = Example.com, CN = foo.example.com/ Failure/Error: its(:subject) { is_expected.to match_without_whitespace(%r{C = CH, O = Example.com, CN = foo.example.com}) } Actual: Expected: C = CH, O = Example.com, CN = foo.example.com Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10

Check failure on line 17 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Distro Puppet - Archlinux rolling

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" subject is expected to match without whitespace /C = CH, O = Example.com, CN = foo.example.com/ Failure/Error: its(:subject) { is_expected.to match_without_whitespace(%r{C = CH, O = Example.com, CN = foo.example.com}) } Actual: Expected: C = CH, O = Example.com, CN = foo.example.com Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10
its(:keylength) { is_expected.to eq 3072 }
its(:keylength) { is_expected.to eq 1024 }

Check failure on line 18 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - AlmaLinux 8

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" keylength is expected to eq 1024 Failure/Error: its(:keylength) { is_expected.to eq 1024 } expected: 1024 got: 0 (compared using ==) Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10

Check failure on line 18 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Distro Puppet - Archlinux rolling

x509_cert example behaves like the example X509 certificate "/tmp/foo.example.com.crt" keylength is expected to eq 1024 Failure/Error: its(:keylength) { is_expected.to eq 1024 } expected: 1024 got: 0 (compared using ==) Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10
end

it { expect(file('/tmp/foo.example.com.key')).to be_file.and(have_attributes(owner: 'nobody', mode: '600')) }

Check failure on line 21 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - AlmaLinux 8

x509_cert example behaves like the example is expected to be file and have attributes {:mode => "600", :owner => "nobody"} Failure/Error: it { expect(file('/tmp/foo.example.com.key')).to be_file.and(have_attributes(owner: 'nobody', mode: '600')) } expected `File "/tmp/foo.example.com.key".file?` to be truthy, got false ...and: expected File "/tmp/foo.example.com.key" to have attributes {:mode => "600", :owner => "nobody"} but had attributes {:mode => "", :owner => ""} Diff for (have attributes {:mode => "600", :owner => "nobody"}): @@ -1,3 +1,3 @@ -:mode => "600", -:owner => "nobody", +:mode => "", +:owner => "", Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10

Check failure on line 21 in spec/acceptance/x509_cert_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Distro Puppet - Archlinux rolling

x509_cert example behaves like the example is expected to be file and have attributes {:mode => "600", :owner => "nobody"} Failure/Error: it { expect(file('/tmp/foo.example.com.key')).to be_file.and(have_attributes(owner: 'nobody', mode: '600')) } expected `File "/tmp/foo.example.com.key".file?` to be truthy, got false ...and: expected File "/tmp/foo.example.com.key" to have attributes {:mode => "600", :owner => "nobody"} but had attributes {:mode => "", :owner => ""} Diff for (have attributes {:mode => "600", :owner => "nobody"}): @@ -1,3 +1,3 @@ -:mode => "600", -:owner => "nobody", +:mode => "", +:owner => "", Shared Example Group: "the example" called from ./spec/acceptance/x509_cert_spec.rb:10
Expand Down

0 comments on commit c7e137a

Please sign in to comment.