diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-09-16 13:32:02 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-09-16 13:32:02 -0700 |
commit | fe126e7720300f8c2fb615d40d9b353443db4e80 (patch) | |
tree | 1a9e4adf6ca04402516dc8616068071f3e2c7e3f | |
parent | 7ee8b83c78bed43add0e74144a27e51e5825dc30 (diff) | |
download | chef-fe126e7720300f8c2fb615d40d9b353443db4e80.tar.gz |
Speed up a openssl helper specsspeedup_specs
This was one of our top 10 slow specs
Before:
Chef::Mixin::OpenSSLHelper#dhparam_pem_valid? When the dhparam.pem file does exist, and does contain a vaild dhparam key returns true
2.71 seconds ./spec/unit/mixin/openssl_helper_spec.rb:101
After:
0.01765 seconds ./spec/unit/mixin/openssl_helper_spec.rb:538
Chef::Mixin::OpenSSLHelper#dhparam_pem_valid? When the dhparam.pem file does exist, and does contain a vaild dhparam key returns true
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/unit/mixin/openssl_helper_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/mixin/openssl_helper_spec.rb b/spec/unit/mixin/openssl_helper_spec.rb index 1cd3960757..7c12037798 100644 --- a/spec/unit/mixin/openssl_helper_spec.rb +++ b/spec/unit/mixin/openssl_helper_spec.rb @@ -99,7 +99,7 @@ describe Chef::Mixin::OpenSSLHelper do context "When the dhparam.pem file does exist, and does contain a vaild dhparam key" do it "returns true" do - @dhparam_file.puts(::OpenSSL::PKey::DH.new(1024).to_pem) + @dhparam_file.puts(::OpenSSL::PKey::DH.new(256).to_pem) # this is 256 to speed up specs @dhparam_file.close expect(instance.dhparam_pem_valid?(@dhparam_file.path)).to be_truthy end |