summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-07-13 13:12:25 -0700
committerTim Smith <tsmith@chef.io>2018-07-13 19:07:05 -0700
commit5b90d09398021b0c6f6dac2081c1d884c8270f51 (patch)
tree2ddb48f23f330cb969afe5f9ebae3c6d4e9822f8 /spec
parentbb0dd117d50dd5b175387b753ce54b3ef6421017 (diff)
downloadchef-5b90d09398021b0c6f6dac2081c1d884c8270f51.tar.gz
Move all plugin logic into knife supermarketknife_supermarket
We want to deprecate knife cookbook site. This moves all the logic into the knife supermarket plugins and has the legacy knife cookbook site plugins inherit from that. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/knife/supermarket_download_spec.rb (renamed from spec/unit/knife/cookbook_site_download_spec.rb)8
-rw-r--r--spec/unit/knife/supermarket_install_spec.rb (renamed from spec/unit/knife/cookbook_site_install_spec.rb)11
-rw-r--r--spec/unit/knife/supermarket_share_spec.rb (renamed from spec/unit/knife/cookbook_site_share_spec.rb)8
-rw-r--r--spec/unit/knife/supermarket_unshare_spec.rb (renamed from spec/unit/knife/cookbook_site_unshare_spec.rb)7
4 files changed, 19 insertions, 15 deletions
diff --git a/spec/unit/knife/cookbook_site_download_spec.rb b/spec/unit/knife/supermarket_download_spec.rb
index 9bf10859c0..0332bd4390 100644
--- a/spec/unit/knife/cookbook_site_download_spec.rb
+++ b/spec/unit/knife/supermarket_download_spec.rb
@@ -1,6 +1,7 @@
#
# Author:: Thomas Bishop (<bishop.thomas@gmail.com>)
# Copyright:: Copyright 2012-2016, Thomas Bishop
+# Copyright:: Copyright 2018, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,13 +17,14 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
+require "chef/knife/supermarket_download"
+require "spec_helper"
-describe Chef::Knife::CookbookSiteDownload do
+describe Chef::Knife::SupermarketDownload do
describe "run" do
before do
- @knife = Chef::Knife::CookbookSiteDownload.new
+ @knife = Chef::Knife::SupermarketDownload.new
@knife.name_args = ["apache2"]
@noauth_rest = double("no auth rest")
@stderr = StringIO.new
diff --git a/spec/unit/knife/cookbook_site_install_spec.rb b/spec/unit/knife/supermarket_install_spec.rb
index 4e9c7b6265..68c8af1028 100644
--- a/spec/unit/knife/cookbook_site_install_spec.rb
+++ b/spec/unit/knife/supermarket_install_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Steven Danna (<steve@chef.io>)
-# Copyright:: Copyright 2011-2016, Chef Software, Inc.
+# Copyright:: Copyright 2011-2018, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,10 +16,11 @@
# limitations under the License.
#
-require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
+require "spec_helper"
+require "chef/knife/supermarket_install"
-describe Chef::Knife::CookbookSiteInstall do
- let(:knife) { Chef::Knife::CookbookSiteInstall.new }
+describe Chef::Knife::SupermarketInstall do
+ let(:knife) { Chef::Knife::SupermarketInstall.new }
let(:stdout) { StringIO.new }
let(:stderr) { StringIO.new }
let(:downloader) { Hash.new }
@@ -52,7 +53,7 @@ describe Chef::Knife::CookbookSiteInstall do
allow(knife).to receive(:shell_out!).and_return(true)
allow(Mixlib::Archive).to receive(:new).and_return(archive)
- # CookbookSiteDownload Stup
+ # SupermarketDownload Setup
allow(knife).to receive(:download_cookbook_to).and_return(downloader)
allow(downloader).to receive(:version) do
if knife.name_args.size == 2
diff --git a/spec/unit/knife/cookbook_site_share_spec.rb b/spec/unit/knife/supermarket_share_spec.rb
index 773c1a78c3..dde58775f4 100644
--- a/spec/unit/knife/cookbook_site_share_spec.rb
+++ b/spec/unit/knife/supermarket_share_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Stephen Delano (<stephen@chef.io>)
-# Copyright:: Copyright 2010-2016, Chef Software Inc.
+# Copyright:: Copyright 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,14 +17,14 @@
#
require "spec_helper"
-
+require "chef/knife/supermarket_share"
require "chef/cookbook_uploader"
require "chef/cookbook_site_streaming_uploader"
-describe Chef::Knife::CookbookSiteShare do
+describe Chef::Knife::SupermarketShare do
before(:each) do
- @knife = Chef::Knife::CookbookSiteShare.new
+ @knife = Chef::Knife::SupermarketShare.new
# Merge default settings in.
@knife.merge_configs
@knife.name_args = %w{cookbook_name AwesomeSausage}
diff --git a/spec/unit/knife/cookbook_site_unshare_spec.rb b/spec/unit/knife/supermarket_unshare_spec.rb
index 7797fdb3f8..206717e211 100644
--- a/spec/unit/knife/cookbook_site_unshare_spec.rb
+++ b/spec/unit/knife/supermarket_unshare_spec.rb
@@ -1,7 +1,7 @@
#
# Author:: Stephen Delano (<stephen@chef.io>)
# Author:: Tim Hinderliter (<tim@chef.io>)
-# Copyright:: Copyright 2010-2016, Chef Software Inc.
+# Copyright:: Copyright 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,11 +18,12 @@
#
require "spec_helper"
+require "chef/knife/supermarket_unshare"
-describe Chef::Knife::CookbookSiteUnshare do
+describe Chef::Knife::SupermarketUnshare do
before(:each) do
- @knife = Chef::Knife::CookbookSiteUnshare.new
+ @knife = Chef::Knife::SupermarketUnshare.new
@knife.name_args = ["cookbook_name"]
allow(@knife).to receive(:confirm).and_return(true)