diff options
author | snehaldwivedi <sdwivedi@msystechnologies.com> | 2020-06-30 19:04:47 +0530 |
---|---|---|
committer | Snehal Dwivedi <snehal.dwivedi@AD.MSYSTECHNOLOGIES.COM> | 2020-07-14 10:34:44 +0530 |
commit | 11f448cb268731a83fab43f034d1ee313e3edf31 (patch) | |
tree | e53cb7213d6ab88c4af6ee2822d9f9120f8763fa | |
parent | d31a02482187691b25ded20d0e068e66bf3e056e (diff) | |
download | chef-11f448cb268731a83fab43f034d1ee313e3edf31.tar.gz |
Update changes for Windows unit tests
Signed-off-by: snehaldwivedi <sdwivedi@msystechnologies.com>
-rw-r--r-- | lib/chef/mixin/openssl_helper.rb | 1 | ||||
-rw-r--r-- | spec/unit/provider/systemd_unit_spec.rb | 20 |
2 files changed, 10 insertions, 11 deletions
diff --git a/lib/chef/mixin/openssl_helper.rb b/lib/chef/mixin/openssl_helper.rb index 3cb20a4569..e7f09c0551 100644 --- a/lib/chef/mixin/openssl_helper.rb +++ b/lib/chef/mixin/openssl_helper.rb @@ -245,7 +245,6 @@ class Chef def gen_serial ::OpenSSL::BN.generate_prime(160) end - # generate a Certificate given a X509 request # @param [OpenSSL::X509::Request] request X509 Certificate Request # @param [Array] extension Array of X509 Certificate Extension diff --git a/spec/unit/provider/systemd_unit_spec.rb b/spec/unit/provider/systemd_unit_spec.rb index b17e3286c1..6298fa34ab 100644 --- a/spec/unit/provider/systemd_unit_spec.rb +++ b/spec/unit/provider/systemd_unit_spec.rb @@ -238,16 +238,16 @@ describe Chef::Provider::SystemdUnit, :linux_only do expect(current_resource.content).to eq(unit_content_string) end - it "does not load the user unit if the file does not exist and user is set" do - new_resource.user("joe") - allow(File).to receive(:exist?) - .with(unit_path_user) - .and_return(false) - expect(File).to_not receive(:read) - .with(unit_path_user) - provider.load_current_resource - expect(current_resource.content).to eq(nil) - end + it "does not load the user unit if the file does not exist and user is set" do + new_resource.user("joe") + allow(File).to receive(:exist?) + .with(unit_path_user) + .and_return(false) + expect(File).to_not receive(:read) + .with(unit_path_user) + provider.load_current_resource + expect(current_resource.content).to eq(nil) + end end %w{/bin/systemctl /usr/bin/systemctl}.each do |systemctl_path| |