diff options
author | nimisha <nimisha.sharad@msystechnologies.com> | 2017-01-27 15:44:48 +0530 |
---|---|---|
committer | nimisha <nimisha.sharad@msystechnologies.com> | 2017-02-02 18:00:37 +0530 |
commit | c39006c5f757281525703d8506bfb6d4e9340082 (patch) | |
tree | 05477983a26f0d2db4bcabceaa9ac6c475c1301e /spec/support/shared/functional | |
parent | dd75bf444a73bc35c226aabaf4f5ea26b8528285 (diff) | |
download | chef-c39006c5f757281525703d8506bfb6d4e9340082.tar.gz |
Fixed bugs, review comments and specs
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'spec/support/shared/functional')
-rw-r--r-- | spec/support/shared/functional/execute_resource.rb | 4 | ||||
-rw-r--r-- | spec/support/shared/functional/windows_script.rb | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/spec/support/shared/functional/execute_resource.rb b/spec/support/shared/functional/execute_resource.rb index 6561f95ec1..3f9dd8af5c 100644 --- a/spec/support/shared/functional/execute_resource.rb +++ b/spec/support/shared/functional/execute_resource.rb @@ -76,12 +76,12 @@ shared_examples_for "an execute resource that supports alternate user identity" let(:windows_current_user_qualified) { "#{ENV['USERDOMAIN'] || ENV['COMPUTERNAME']}\\#{windows_current_user}" } let(:resource_identity_command) { "powershell.exe -noprofile -command \"import-module microsoft.powershell.utility;([Security.Principal.WindowsPrincipal]([Security.Principal.WindowsIdentity]::GetCurrent())).identity.name | out-file -encoding ASCII '#{script_output_path}'\"" } - let(:execute_resource) { + let(:execute_resource) do resource.user(windows_alternate_user) resource.password(windows_alternate_user_password) resource.send(resource_command_property, resource_identity_command) resource - } + end it "executes the process as an alternate user" do expect(windows_current_user.length).to be > 0 diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb index 4bd6bdf230..8a9a19d4ad 100644 --- a/spec/support/shared/functional/windows_script.rb +++ b/spec/support/shared/functional/windows_script.rb @@ -160,11 +160,6 @@ shared_context Chef::Resource::WindowsScript do end end - context "when a different non-admin user attempts read to access the script" do - let(:file_access_command) { read_access_denied_command } - it_behaves_like "a script whose file system location cannot be accessed by other non-admin users" - end - context "when a different non-admin user attempts write (modify) to access the script" do let(:file_access_command) { modify_access_denied_command } it_behaves_like "a script whose file system location cannot be accessed by other non-admin users" |