summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-09-15 09:28:47 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-09-15 09:28:47 -0700
commit982ec1a40fa7ad79337b2bd780d976b14d1de275 (patch)
tree4a6c3572605c32713e8f643999870eea37a5d8d1 /spec
parent591fa4bf4ca725a3c3cdc918b3f8ed41482ca8ad (diff)
downloadchef-982ec1a40fa7ad79337b2bd780d976b14d1de275.tar.gz
suppress deprecation errors in testslcg/manage-home-fix
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/user/dscl_spec.rb4
-rw-r--r--spec/unit/provider/user/pw_spec.rb2
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/provider/user/dscl_spec.rb b/spec/unit/provider/user/dscl_spec.rb
index dfaaa377d3..7b8be02f3a 100644
--- a/spec/unit/provider/user/dscl_spec.rb
+++ b/spec/unit/provider/user/dscl_spec.rb
@@ -219,6 +219,8 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30"
end
before do
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
new_resource.supports({ :manage_home => true })
new_resource.home("/Users/toor")
@@ -237,6 +239,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30"
end
it "moves the users home to the new location if it exists and the target location is different" do
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
new_resource.supports(:manage_home => true)
current_home = CHEF_SPEC_DATA + "/old_home_dir"
@@ -856,6 +859,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30")
describe "when Chef is removing the user" do
it "removes the user from the groups and deletes home directory when the resource is configured to manage home" do
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
new_resource.supports({ :manage_home => true })
expect(provider).to receive(:run_dscl).with("list /Groups").and_return("my_group\nyour_group\nreal_group\n")
expect(provider).to receive(:run_dscl).with("read /Groups/my_group").and_raise(Chef::Exceptions::DsclCommandFailed) # Empty group
diff --git a/spec/unit/provider/user/pw_spec.rb b/spec/unit/provider/user/pw_spec.rb
index 624bcfc67d..fb7c9211a1 100644
--- a/spec/unit/provider/user/pw_spec.rb
+++ b/spec/unit/provider/user/pw_spec.rb
@@ -32,6 +32,8 @@ describe Chef::Provider::User::Pw do
@new_resource.shell "/usr/bin/zsh"
@new_resource.password "abracadabra"
+ # XXX: rip out in Chef-13
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
@new_resource.supports :manage_home => true
@current_resource = Chef::Resource::User::PwUser.new("adam")