summaryrefslogtreecommitdiff
path: root/spec/integration/util/windows/process_spec.rb
diff options
context:
space:
mode:
authorJosh Partlow <joshua.partlow@puppetlabs.com>2014-09-03 12:44:38 -0700
committerJosh Partlow <joshua.partlow@puppetlabs.com>2014-09-03 12:44:38 -0700
commitd02943ffc0d3fa6e12758ce272bb332e569725c6 (patch)
tree77a911a75036c339ce49e4b44747d6544bfb03f3 /spec/integration/util/windows/process_spec.rb
parentb2c3dba204522dc243134b90e70117f8ee33b0e8 (diff)
parent45b4945e5c5e79c85168c8a8c5583ea4a33ed50c (diff)
downloadpuppet-d02943ffc0d3fa6e12758ce272bb332e569725c6.tar.gz
Merge remote-tracking branch 'upstream/master' into stable
* upstream/master: (767 commits) (maint) Namespace constant declaration in specs to prevent warnings (maint) Expect test to fail on windows ruby 2.0 x86 (PUP-3069) Fix path expansion for environment.conf test on Win (PUP-2349) Add windows specific expectation for deprecation_warning (PUP-2349) Add windows specific expectation for deprecation_warning (PUP-3069) Clear configuration_file for tests (PUP-3069) Test both future and current parser with default_manifest (PUP-3069) Update default_manifest setting descriptions (PUP-3069) Change restrict_environment_manifest name (PUP-3163) Create and manage the mode of $reportsdir (maint) Clear record of configured deprecated settings (PUP-3069) Add an integration spec for default_manifest (PUP-3069) Halt compile if environment has manifest conflict (PUP-3069) Add spec test for new default options (PUP-3069) Add default manifest settings PUP-3155 Improve spec tests around the PE puppet version (PUP-3153) Guard against nil when closing Uniquefiles (PUP-2984) Remove old installation directory when going from x64 to x86 (PUP-1884) Migrate MSI deps into puppet repo (PUP-3154) Create and manage the mode of $statedir on redhat ...
Diffstat (limited to 'spec/integration/util/windows/process_spec.rb')
-rw-r--r--spec/integration/util/windows/process_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/integration/util/windows/process_spec.rb b/spec/integration/util/windows/process_spec.rb
index 6dc54d228..60eae3443 100644
--- a/spec/integration/util/windows/process_spec.rb
+++ b/spec/integration/util/windows/process_spec.rb
@@ -18,5 +18,17 @@ describe "Puppet::Util::Windows::Process", :if => Puppet.features.microsoft_wind
Puppet::Util::Windows::User.should be_admin
Puppet::Util::Windows::Process.process_privilege_symlink?.should be_false
end
+
+ it "should be able to lookup a standard Windows process privilege" do
+ Puppet::Util::Windows::Process.lookup_privilege_value('SeShutdownPrivilege') do |luid|
+ luid.should_not be_nil
+ luid.should be_instance_of(Puppet::Util::Windows::Process::LUID)
+ end
+ end
+
+ it "should raise an error for an unknown privilege name" do
+ fail_msg = /LookupPrivilegeValue\(, foo, .*\): A specified privilege does not exist/
+ expect { Puppet::Util::Windows::Process.lookup_privilege_value('foo') }.to raise_error(Puppet::Util::Windows::Error, fail_msg)
+ end
end
end