summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-06-23 10:09:15 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-06-23 10:09:15 -0700
commit3f7cafbe0e02fe7de05159963a83d7e18cda7d92 (patch)
tree65d68f463344326c9442d29615225ed765d56b71
parent0336c707781062aa4c31d084499f50236b55d325 (diff)
downloadchef-3f7cafbe0e02fe7de05159963a83d7e18cda7d92.tar.gz
sub timing
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/functional/resource/msu_package_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/functional/resource/msu_package_spec.rb b/spec/functional/resource/msu_package_spec.rb
index 23342be6ae..640c3aa855 100644
--- a/spec/functional/resource/msu_package_spec.rb
+++ b/spec/functional/resource/msu_package_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Nimisha Sharad (<nimisha.sharad@msystechnologies.com>)
-# Copyright:: Copyright (c) 2016 Chef Software, Inc.
+# Copyright:: Copyright (c) 2016-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,6 +18,7 @@
require "spec_helper"
require "chef/provider/package/cab"
+require "benchmark"
describe Chef::Resource::MsuPackage, :win2012r2_only do
@@ -43,7 +44,9 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
after { remove_package }
it "installs the package successfully" do
- subject.run_action(:install)
+ puts Benchmark.measure {
+ subject.run_action(:install)
+ }
found_packages = cab_provider.installed_packages.select { |p| p["package_identity"] =~ /^#{package_name}~/ }
expect(found_packages.length).to be == 1
end
@@ -52,7 +55,9 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
context "removing a package" do
it "removes an installed package" do
subject.run_action(:install)
- remove_package
+ puts Benchmark.measure {
+ remove_package
+ }
found_packages = cab_provider.installed_packages.select { |p| p["package_identity"] =~ /^#{package_name}~/ }
expect(found_packages.length).to be == 0
end