summaryrefslogtreecommitdiff
path: root/spec/unit/provider/group/groupmod_spec.rb
diff options
context:
space:
mode:
authorPhil Dibowitz <phil@ipom.com>2021-03-06 19:10:18 -0800
committerPhil Dibowitz <phil@ipom.com>2021-03-06 19:24:59 -0800
commita1e0630be7f505b99ecba23c1a9994809c964618 (patch)
tree103a09bed505bdf0c5b9a1e3a2c95d229c4aac54 /spec/unit/provider/group/groupmod_spec.rb
parent228291d27b8f1827f98911b6b0192d1efe06e4a3 (diff)
downloadchef-a1e0630be7f505b99ecba23c1a9994809c964618.tar.gz
Move idempotency logs to debug
This was discussed in the last Chef Triage meeting. In the great move to trace logging, which is great, idempotency check logs moved to trace, which defeats the purpose. The goal is to keep "internal chef" logging in trace so that when users are trying to figure out why their cookbook isn't acting as expected they can look at debug without having to see all the other cruft. But "here's why I didn't install the package you said to install" is table-steaks "I'm trying to debug my cookbook." This moves those logs back to debug. There were a variety of cases where logging was pretty nonstandard in other ways, but to keep this PR scoped, I didn't change those. I did fix a few related logging issues: * A few warns that should have been debug in windows_task * A few places where there was basically no logging whatsoever, I put a few of the "I did X" logs to 'debug' (from trace). It coudl be argued some of those should be 'info', but that's a bigger change that I didn't want to put into this PR Signed-off-by: Phil Dibowitz <phil@ipom.com>
Diffstat (limited to 'spec/unit/provider/group/groupmod_spec.rb')
-rw-r--r--spec/unit/provider/group/groupmod_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/group/groupmod_spec.rb b/spec/unit/provider/group/groupmod_spec.rb
index 5a7d1ada77..9961d32bc5 100644
--- a/spec/unit/provider/group/groupmod_spec.rb
+++ b/spec/unit/provider/group/groupmod_spec.rb
@@ -64,7 +64,7 @@ describe Chef::Provider::Group::Groupmod do
end
it "logs a message and sets group's members to 'none', then removes existing group members" do
- expect(logger).to receive(:trace).with("group[wheel] setting group members to: none")
+ expect(logger).to receive(:debug).with("group[wheel] setting group members to: none")
expect(@provider).to receive(:shell_out_compacted!).with("group", "mod", "-n", "wheel_bak", "wheel")
expect(@provider).to receive(:shell_out_compacted!).with("group", "add", "-g", "123", "-o", "wheel")
expect(@provider).to receive(:shell_out_compacted!).with("group", "del", "wheel_bak")
@@ -79,7 +79,7 @@ describe Chef::Provider::Group::Groupmod do
end
it "logs a message and does not modify group membership" do
- expect(logger).to receive(:trace).with("group[wheel] not changing group members, the group has no members to add")
+ expect(logger).to receive(:debug).with("group[wheel] not changing group members, the group has no members to add")
expect(@provider).not_to receive(:shell_out_compacted!)
@provider.manage_group
end