diff options
author | snehaldwivedi <sdwivedi@msystechnologies.com> | 2021-11-02 00:01:56 -0700 |
---|---|---|
committer | snehaldwivedi <sdwivedi@msystechnologies.com> | 2021-11-02 00:01:56 -0700 |
commit | b16cc94f174fa01c4813038497f8b50a51f1db48 (patch) | |
tree | 049f68a7aa9abae555ed17f31fd30d0ffe65ce47 /spec | |
parent | 3a4fc1dad717951a06b3bfd02a070582917f6a41 (diff) | |
download | chef-b16cc94f174fa01c4813038497f8b50a51f1db48.tar.gz |
updated rspecsnehal/chef_client_validation_key_fix
Diffstat (limited to 'spec')
-rw-r--r-- | spec/integration/client/client_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/application/base_spec.rb | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index 50fe825a48..adcffec715 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -74,7 +74,7 @@ describe "chef-client" do shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" -K #{@path} ", cwd: chef_dir) end - it "should find validation.pem successfully in /etc/chef/ directory" do + it "should find validation.pem successfully in default directory" do shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" ", cwd: chef_dir) end end diff --git a/spec/unit/application/base_spec.rb b/spec/unit/application/base_spec.rb index a3a794871d..ce90464603 100644 --- a/spec/unit/application/base_spec.rb +++ b/spec/unit/application/base_spec.rb @@ -29,8 +29,12 @@ describe Chef::Application::Base, "setup_application" do end context "when validation key is not supplied" do - it "should return full path for validation_key" do - expect(Chef::Config.validation_key).to eql("/etc/chef/validation.pem") + it "should return default path for validation_key" do + if windows? + expect(Chef::Config.validation_key).to eql("C:\\chef\\validation.pem") + else + expect(Chef::Config.validation_key).to eql("/etc/chef/validation.pem") + end end end end |