summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-22 09:43:36 -0700
committerTim Smith <tsmith@chef.io>2018-03-22 09:43:36 -0700
commit0938c0cecd5d2da3e117f78ed9d13c9e9f0e235f (patch)
tree72af98ec8689265c6b0e5826d71eba0f4a2bf596 /spec
parent65d26d53a70a7813c36e29f819868aadacd612f9 (diff)
downloadchef-0938c0cecd5d2da3e117f78ed9d13c9e9f0e235f.tar.gz
sudo: Don't fail on FreeBSD. Turns out there's a .d directory
I guess they use .d directory structures in sudo, but that's about it. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/resource/sudo_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/resource/sudo_spec.rb b/spec/unit/resource/sudo_spec.rb
index 660eb285da..8f5103597c 100644
--- a/spec/unit/resource/sudo_spec.rb
+++ b/spec/unit/resource/sudo_spec.rb
@@ -80,6 +80,11 @@ describe Chef::Resource::Sudo do
expect(resource.config_prefix).to eql("/private/etc")
end
+ it "it sets the config prefix to /usr/local/etc on FreeBSD" do
+ node.automatic[:platform_family] = "freebsd"
+ expect(resource.config_prefix).to eql("/usr/local/etc")
+ end
+
it "it sets the config prefix to /opt/local/etc on smartos" do
node.automatic[:platform_family] = "smartos"
expect(resource.config_prefix).to eql("/opt/local/etc")