Skip to content

Commit

Permalink
Merge pull request #4344 from chef/if/warn-on-reload-resource
Browse files Browse the repository at this point in the history
Warn (v. info) when reloading resources
  • Loading branch information
thommay committed Jan 13, 2016
2 parents 556e5f2 + f822e4d commit e42f1c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/chef/provider/lwrp_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class <<self

def build_from_file(cookbook_name, filename, run_context)
if LWRPBase.loaded_lwrps[filename]
Chef::Log.info("LWRP provider #{filename} from cookbook #{cookbook_name} has already been loaded! Skipping the reload.")
Chef::Log.debug("LWRP provider #{filename} from cookbook #{cookbook_name} has already been loaded! Skipping the reload.")
return loaded_lwrps[filename]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/lwrp_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class <<self

def build_from_file(cookbook_name, filename, run_context)
if LWRPBase.loaded_lwrps[filename]
Chef::Log.info("Custom resource #{filename} from cookbook #{cookbook_name} has already been loaded! Skipping the reload.")
Chef::Log.debug("Custom resource #{filename} from cookbook #{cookbook_name} has already been loaded! Skipping the reload.")
return loaded_lwrps[filename]
end

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/lwrp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_lwrp_provider(name)
end

Dir[File.expand_path( "lwrp/resources/*", CHEF_SPEC_DATA)].each do |file|
expect(Chef::Log).to receive(:info).with(/Skipping/)
expect(Chef::Log).to receive(:debug).with(/Skipping/)
Chef::Resource::LWRPBase.build_from_file("lwrp", file, nil)
end
end
Expand All @@ -95,7 +95,7 @@ def get_lwrp_provider(name)
end

Dir[File.expand_path( "lwrp/providers/*", CHEF_SPEC_DATA)].each do |file|
expect(Chef::Log).to receive(:info).with(/Skipping/)
expect(Chef::Log).to receive(:debug).with(/Skipping/)
Chef::Provider::LWRPBase.build_from_file("lwrp", file, nil)
end
end
Expand Down

0 comments on commit e42f1c3

Please sign in to comment.