diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-02-03 15:50:35 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-02-03 16:09:37 -0800 |
commit | decd821184efc47df6f0fb9fcaf07ed3e73a48e2 (patch) | |
tree | a017315f7f53bd2b84bdec5eb4160e4445018cc2 | |
parent | 7677a88c72f9097f8cc5455e2a16e19bf2bf81a7 (diff) | |
download | chef-decd821184efc47df6f0fb9fcaf07ed3e73a48e2.tar.gz |
Try turning on specs conditionally again
This may work now that we're not in Jenkins
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/shared/functional/execute_resource.rb | 4 | ||||
-rw-r--r-- | spec/support/shared/functional/windows_script.rb | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 95a4c62a77..5d49d54cd3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -159,6 +159,7 @@ RSpec.configure do |config| config.filter_run_excluding windows_powershell_no_dsc_only: true if windows_powershell_dsc? config.filter_run_excluding windows_domain_joined_only: true unless windows_domain_joined? config.filter_run_excluding windows_not_domain_joined_only: true if windows_domain_joined? + config.filter_run_excluding windows_service_requires_assign_token: true if !STDOUT.isatty && !windows_user_right?("SeAssignPrimaryTokenPrivilege") config.filter_run_excluding solaris_only: true unless solaris? config.filter_run_excluding unix_only: true unless unix? config.filter_run_excluding linux_only: true unless linux? diff --git a/spec/support/shared/functional/execute_resource.rb b/spec/support/shared/functional/execute_resource.rb index 3f870d0fb6..9d1c29dfac 100644 --- a/spec/support/shared/functional/execute_resource.rb +++ b/spec/support/shared/functional/execute_resource.rb @@ -68,7 +68,7 @@ shared_context "a command that can be executed as an alternate user" do end shared_examples_for "an execute resource that supports alternate user identity" do - context "when running on Windows", :windows_only do + context "when running on Windows", :windows_only, :windows_service_requires_assign_token do include_context "a command that can be executed as an alternate user" @@ -102,7 +102,7 @@ shared_examples_for "an execute resource that supports alternate user identity" end shared_examples_for "a resource with a guard specifying an alternate user identity" do - context "when running on Windows", :windows_only do + context "when running on Windows", :windows_only, :windows_service_requires_assign_token do include_context "alternate user identity" let(:resource_command_property) { :command } diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb index 9f328f0b92..151ad2387c 100644 --- a/spec/support/shared/functional/windows_script.rb +++ b/spec/support/shared/functional/windows_script.rb @@ -168,11 +168,11 @@ shared_context Chef::Resource::WindowsScript do resource.run_action(:run) end - context "the script is executed with the identity of the current user" do + context "the script is executed with the identity of the current user", :windows_service_requires_assign_token do it_behaves_like "a script that cannot be accessed by other users if they are not administrators" end - context "the script is executed with an alternate non-admin identity" do + context "the script is executed with an alternate non-admin identity", :windows_service_requires_assign_token do include_context "alternate user identity" before do |