diff options
author | Tim Smith <tsmith@chef.io> | 2021-02-02 12:07:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 12:07:24 -0800 |
commit | 75770373fa6c463e6a960ffa69c99511c13fc14c (patch) | |
tree | d0f35a24ce96dbbddd84b4c6741fa7e051b8de1f | |
parent | 96e1f6d3f52e0ce6e66087ede8b65bf342154a26 (diff) | |
parent | 3aa2f80450e4b78bbbe9877c81c983f5492f01df (diff) | |
download | chef-75770373fa6c463e6a960ffa69c99511c13fc14c.tar.gz |
Merge pull request #10968 from chef/fix_specs
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 26 | ||||
-rw-r--r-- | omnibus/Gemfile.lock | 34 | ||||
-rw-r--r-- | spec/unit/knife/supermarket_share_spec.rb | 11 |
4 files changed, 36 insertions, 37 deletions
@@ -53,7 +53,7 @@ end group(:development, :test) do gem "rake" - gem "rspec", "=3.9.0" # remove pin once https://github.com/chef/chef/issues/10817 is resolved + gem "rspec" gem "webmock" gem "fauxhai-ng" # for chef-utils gem end diff --git a/Gemfile.lock b/Gemfile.lock index 40c55562ea..7a459a9858 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -290,22 +290,22 @@ GEM rb-readline (0.5.5) regexp_parser (2.0.3) rexml (3.2.4) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.3) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.4) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.10.0) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.9.1) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.4) + rspec-support (~> 3.10.0) + rspec-support (3.10.2) rubocop (1.7.0) parallel (~> 1.10) parser (>= 2.7.1.5) @@ -366,7 +366,7 @@ GEM unicode-display_width (1.7.0) unicode_utils (1.4.0) uuidtools (2.2.0) - webmock (3.11.1) + webmock (3.11.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -438,7 +438,7 @@ DEPENDENCIES pry-stack_explorer rake rb-readline - rspec (= 3.9.0) + rspec ruby-prof (< 1.3.0) ruby-shadow webmock diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index 2192fe5476..235ff440c9 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/chef/omnibus - revision: 65c593140db931e91a25ce6624d99a3248c7288e + revision: aeda0bb23bfe19b52fb50a410e67c2727a44dec4 branch: master specs: - omnibus (8.0.13) + omnibus (8.0.14) aws-sdk-s3 (~> 1) chef-cleanroom (~> 1.0) chef-utils (>= 15.4) @@ -32,7 +32,7 @@ GEM artifactory (3.0.15) awesome_print (1.8.0) aws-eventstream (1.1.0) - aws-partitions (1.420.0) + aws-partitions (1.422.0) aws-sdk-core (3.111.2) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) @@ -64,12 +64,12 @@ GEM solve (~> 4.0) thor (>= 0.20) builder (3.2.4) - chef (16.9.29) + chef (16.9.32) addressable bcrypt_pbkdf (= 1.1.0.rc2) bundler (>= 1.10) - chef-config (= 16.9.29) - chef-utils (= 16.9.29) + chef-config (= 16.9.32) + chef-utils (= 16.9.32) chef-vault chef-zero (>= 14.0.11) diff-lcs (>= 1.2.4, < 1.4.0) @@ -101,12 +101,12 @@ GEM tty-screen (~> 0.6) tty-table (~> 0.11) uuidtools (>= 2.1.5, < 3.0) - chef (16.9.29-universal-mingw32) + chef (16.9.32-universal-mingw32) addressable bcrypt_pbkdf (= 1.1.0.rc2) bundler (>= 1.10) - chef-config (= 16.9.29) - chef-utils (= 16.9.29) + chef-config (= 16.9.32) + chef-utils (= 16.9.32) chef-vault chef-zero (>= 14.0.11) diff-lcs (>= 1.2.4, < 1.4.0) @@ -150,9 +150,9 @@ GEM win32-taskscheduler (~> 2.0) wmi-lite (~> 1.0) chef-cleanroom (1.0.2) - chef-config (16.9.29) + chef-config (16.9.32) addressable - chef-utils (= 16.9.29) + chef-utils (= 16.9.32) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -161,7 +161,7 @@ GEM chef-config concurrent-ruby (~> 1.0) ffi-yajl (~> 2.2) - chef-utils (16.9.29) + chef-utils (16.9.32) chef-vault (4.1.0) chef-zero (15.0.4) ffi-yajl (~> 2.2) @@ -331,10 +331,10 @@ GEM rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.10.1) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-support (3.10.1) + rspec-support (3.10.2) ruby-progressbar (1.11.0) ruby2_keywords (0.0.4) rubyntlm (0.6.3) @@ -378,8 +378,8 @@ GEM mixlib-shellout (>= 2.0, < 4.0) net-scp (>= 1.2, < 4.0) net-ssh (>= 2.9, < 7.0) - train-winrm (0.2.11) - winrm (~> 2.0) + train-winrm (0.2.12) + winrm (>= 2.3.6, < 3.0) winrm-elevated (~> 1.2.2) winrm-fs (~> 1.0) tty-box (0.7.0) @@ -405,7 +405,7 @@ GEM uuidtools (2.2.0) webrick (1.7.0) win32-api (1.5.3-universal-mingw32) - win32-certstore (0.4.1) + win32-certstore (0.5.3) ffi mixlib-shellout win32-event (0.6.3) diff --git a/spec/unit/knife/supermarket_share_spec.rb b/spec/unit/knife/supermarket_share_spec.rb index f6c44f4cd8..088cef9dfd 100644 --- a/spec/unit/knife/supermarket_share_spec.rb +++ b/spec/unit/knife/supermarket_share_spec.rb @@ -46,7 +46,9 @@ describe Chef::Knife::SupermarketShare do allow(@knife).to receive(:shell_out!).and_return(true) @stdout = StringIO.new + @stderr = StringIO.new allow(@knife.ui).to receive(:stdout).and_return(@stdout) + allow(@knife.ui).to receive(:stderr).and_return(@stderr) end describe "run" do @@ -140,7 +142,9 @@ describe Chef::Knife::SupermarketShare do before do allow(Chef::CookbookSiteStreamingUploader).to receive(:create_build_dir).and_return("/var/tmp/dummy") @knife.config = { dry_run: true } - allow(@knife).to receive_message_chain(:shell_out!, :stdout).and_return("file") + @so = instance_double("Mixlib::ShellOut") + allow(@knife).to receive(:shell_out!).and_return(@so) + allow(@so).to receive(:stdout).and_return("file") end it "should list files in the tarball" do @@ -151,7 +155,6 @@ describe Chef::Knife::SupermarketShare do end it "does not upload the cookbook" do - allow(@knife).to receive(:shell_out!).and_return(true) expect(@knife).not_to receive(:do_upload) @knife.run end @@ -164,10 +167,6 @@ describe Chef::Knife::SupermarketShare do @upload_response = double("Net::HTTPResponse") allow(Chef::CookbookSiteStreamingUploader).to receive(:post).and_return(@upload_response) - @stdout = StringIO.new - @stderr = StringIO.new - allow(@knife.ui).to receive(:stdout).and_return(@stdout) - allow(@knife.ui).to receive(:stderr).and_return(@stderr) allow(File).to receive(:open).and_return(true) end |