diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-07 11:08:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 11:08:46 -0800 |
commit | 62dca7c0ff16aaf1ed860285e644cb2b6c8b0552 (patch) | |
tree | 99ca6d265ce5b0bdb85d3e0148fdf48d5814219c /spec | |
parent | 640283a5157016ca0f9ce3a91005c9b073ad8828 (diff) | |
parent | dabd2413e08794aa46726a573183d4b8e5830514 (diff) | |
download | chef-62dca7c0ff16aaf1ed860285e644cb2b6c8b0552.tar.gz |
Merge pull request #6956 from chef/bff
Rename bff provider to match its resource
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/package/bff_spec.rb (renamed from spec/unit/provider/package/aix_spec.rb) | 8 | ||||
-rw-r--r-- | spec/unit/provider_resolver_spec.rb | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/spec/unit/provider/package/aix_spec.rb b/spec/unit/provider/package/bff_spec.rb index 3c54c6a80c..1018f2d3e9 100644 --- a/spec/unit/provider/package/aix_spec.rb +++ b/spec/unit/provider/package/bff_spec.rb @@ -18,7 +18,7 @@ # require "spec_helper" -describe Chef::Provider::Package::Aix do +describe Chef::Provider::Package::Bff do before(:each) do @node = Chef::Node.new @events = Chef::EventDispatch::Dispatcher.new @@ -27,7 +27,7 @@ describe Chef::Provider::Package::Aix do @new_resource = Chef::Resource::Package.new("samba.base") @new_resource.source("/tmp/samba.base") - @provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context) + @provider = Chef::Provider::Package::Bff.new(@new_resource, @run_context) allow(::File).to receive(:exist?).with(@new_resource.source).and_return(true) end @@ -99,7 +99,7 @@ describe Chef::Provider::Package::Aix do it "should raise an exception if the source is not set but we are installing" do status = double("Status", :stdout => "", :exitstatus => 1, :format_for_exception => "") @new_resource = Chef::Resource::Package.new("samba.base") - @provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context) + @provider = Chef::Provider::Package::Bff.new(@new_resource, @run_context) allow(@provider).to receive(:shell_out).and_return(status) expect { @provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package) end @@ -156,7 +156,7 @@ describe Chef::Provider::Package::Aix do it "should run installp -aYF -d when the package is a path to install" do @new_resource = Chef::Resource::Package.new("/tmp/samba.base") - @provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context) + @provider = Chef::Provider::Package::Bff.new(@new_resource, @run_context) expect(@new_resource.source).to eq("/tmp/samba.base") expect(@provider).to receive(:shell_out!).with("installp", "-aYF", "-d", "/tmp/samba.base", "/tmp/samba.base", timeout: 900) @provider.install_package("/tmp/samba.base", "3.3.12.0") diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb index ac641de43a..6fa05c936a 100644 --- a/spec/unit/provider_resolver_spec.rb +++ b/spec/unit/provider_resolver_spec.rb @@ -554,6 +554,7 @@ describe Chef::ProviderResolver do PROVIDERS = { bash: [ Chef::Resource::Bash, Chef::Provider::Script ], + bff_package: [ Chef::Resource::BffPackage, Chef::Provider::Package::Bff ], breakpoint: [ Chef::Resource::Breakpoint, Chef::Resource::Breakpoint.action_class ], chef_gem: [ Chef::Resource::ChefGem, Chef::Provider::Package::Rubygems ], cookbook_file: [ Chef::Resource::CookbookFile, Chef::Provider::CookbookFile ], @@ -592,7 +593,6 @@ describe Chef::ProviderResolver do # We want to check that these are unsupported: apt_package: nil, - bff_package: nil, dpkg_package: nil, dsc_script: nil, ips_package: nil, @@ -781,13 +781,11 @@ describe Chef::ProviderResolver do }, "aix" => { - bff_package: [ Chef::Resource::BffPackage, Chef::Provider::Package::Aix ], cron: [ Chef::Resource::Cron, Chef::Provider::Cron::Aix ], group: [ Chef::Resource::Group, Chef::Provider::Group::Aix ], ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Aix ], mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Aix ], - # TODO should be Chef::Resource::BffPackage - package: [ Chef::Resource::Package, Chef::Provider::Package::Aix ], + package: [ Chef::Resource::Package, Chef::Provider::Package::Bff ], rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ], user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ], # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ], |