diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-12 13:14:49 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-12 17:04:18 -0700 |
commit | f2b7f2d8f27dff7ba079042562f1f3d62b08e67e (patch) | |
tree | 3581aa2a351e0b9135a2515e235a1ab9c56e3b49 /spec | |
parent | c135ff35beab68c46bdb0c69925bae8dab736eaa (diff) | |
download | chef-f2b7f2d8f27dff7ba079042562f1f3d62b08e67e.tar.gz |
Use User resource to cleanup
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/user/useradd_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb index d58247412f..f01295586e 100644 --- a/spec/functional/resource/user/useradd_spec.rb +++ b/spec/functional/resource/user/useradd_spec.rb @@ -81,12 +81,11 @@ describe Chef::Provider::User::Useradd, metadata do ['/home/foo', '/home/bar'].each do |f| shell_out("rm", "-r", f) end + ['cf-test'].each do |u| - if RUBY_PLATFORM =~ /freebsd/ - shell_out("pw", "userdel", "-r", username) - else - shell_out("userdel", "-r", username) - end + r = Chef::Resource::User.new("DELETE USER", run_context) + r.username('cf-test') + r.run_action(:remove) end end |