summaryrefslogtreecommitdiff
path: root/spec/integration/recipes
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-20 12:36:33 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-20 12:36:33 -0700
commit02ec917f9356d999c44aceb7f1ff43957b0fe832 (patch)
tree7d8ac0f9403a01d1a620ce9b3bd06398e11fd1bd /spec/integration/recipes
parent83a656421581f12f323d24e01b36edc14e92309c (diff)
downloadchef-02ec917f9356d999c44aceb7f1ff43957b0fe832.tar.gz
Chef-13: remove more deprecated provider_resolver code
I think this nukes descendants tracker, although might need to clean it up in a few more spots. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/integration/recipes')
-rw-r--r--spec/integration/recipes/recipe_dsl_spec.rb86
1 files changed, 0 insertions, 86 deletions
diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb
index 27176f65d8..84a4e455ea 100644
--- a/spec/integration/recipes/recipe_dsl_spec.rb
+++ b/spec/integration/recipes/recipe_dsl_spec.rb
@@ -1190,17 +1190,6 @@ describe "Recipe DSL methods" do
end.to raise_error(Chef::Exceptions::NoSuchResourceType)
expect(resource_class.called_provides).to be_truthy
end
-
- it "blarghle_blarghle_little_star 'foo' returns the resource and emits a warning" do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- dsl_name = blarghle_blarghle_little_star
- recipe = converge do
- instance_eval("#{dsl_name} 'foo'")
- end
- expect(recipe.logged_warnings).to include "WARN: #{resource_class}.provides? returned true when asked if it provides DSL #{dsl_name}, but provides :#{dsl_name} was never called!"
- expect(BaseThingy.created_resource).to eq resource_class
- expect(resource_class.called_provides).to be_truthy
- end
end
context "and a provider" do
@@ -1324,81 +1313,6 @@ describe "Recipe DSL methods" do
end
end
end
-
- context "with provides? returning true" do
- before do
- temp_my_resource = my_resource
- provider_class.define_singleton_method(:provides?) do |node, resource|
- @called_provides = true
- resource.declared_type == temp_my_resource
- end
- end
-
- context "that provides :my_resource" do
- before do
- provider_class.provides my_resource
- end
-
- it "my_resource calls the provider (and calls provides?), but does not emit a warning" do
- temp_my_resource = my_resource
- recipe = converge do
- instance_eval("#{temp_my_resource} 'foo'")
- end
- expect(recipe.logged_warnings).to eq ""
- expect(BaseThingy.created_provider).to eq provider_class
- expect(provider_class.called_provides).to be_truthy
- end
- end
-
- context "that does not call provides :my_resource" do
- it "my_resource calls the provider (and calls provides?), and emits a warning" do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- temp_my_resource = my_resource
- recipe = converge do
- instance_eval("#{temp_my_resource} 'foo'")
- end
- expect(recipe.logged_warnings).to include("WARN: #{provider_class}.provides? returned true when asked if it provides DSL #{my_resource}, but provides :#{my_resource} was never called!")
- expect(BaseThingy.created_provider).to eq provider_class
- expect(provider_class.called_provides).to be_truthy
- end
- end
- end
-
- context "with provides? returning false to my_resource" do
- before do
- temp_my_resource = my_resource
- provider_class.define_singleton_method(:provides?) do |node, resource|
- @called_provides = true
- false
- end
- end
-
- context "that provides :my_resource" do
- before do
- provider_class.provides my_resource
- end
-
- it "my_resource fails to find a provider (and calls provides)" do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- temp_my_resource = my_resource
- expect_converge do
- instance_eval("#{temp_my_resource} 'foo'")
- end.to raise_error(Chef::Exceptions::ProviderNotFound)
- expect(provider_class.called_provides).to be_truthy
- end
- end
-
- context "that does not provide :my_resource" do
- it "my_resource fails to find a provider (and calls provides)" do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- temp_my_resource = my_resource
- expect_converge do
- instance_eval("#{temp_my_resource} 'foo'")
- end.to raise_error(Chef::Exceptions::ProviderNotFound)
- expect(provider_class.called_provides).to be_truthy
- end
- end
- end
end
end
end