diff options
-rw-r--r-- | spec/functional/resource/user/useradd_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb index f01295586e..97c5c7c521 100644 --- a/spec/functional/resource/user/useradd_spec.rb +++ b/spec/functional/resource/user/useradd_spec.rb @@ -78,7 +78,7 @@ describe Chef::Provider::User::Useradd, metadata do end def try_cleanup - ['/home/foo', '/home/bar'].each do |f| + ['/home/cheftestfoo', '/home/cheftestbar'].each do |f| shell_out("rm", "-r", f) end @@ -400,18 +400,18 @@ describe Chef::Provider::User::Useradd, metadata do end context "and home directory is updated" do - let(:existing_home) { "/home/foo" } - let(:home) { "/home/bar" } + let(:existing_home) { "/home/cheftestfoo" } + let(:home) { "/home/cheftestbar" } it "ensures the home directory is set to the desired value" do - expect(pw_entry.home).to eq("/home/bar") + expect(pw_entry.home).to eq("/home/cheftestbar") end context "and manage_home is enabled" do let(:existing_manage_home) { true } let(:manage_home) { true } it "moves the home directory to the new location" do - expect(File).not_to exist("/home/foo") - expect(File).to exist("/home/bar") + expect(File).not_to exist("/home/cheftestfoo") + expect(File).to exist("/home/cheftestbar") end end @@ -423,19 +423,19 @@ describe Chef::Provider::User::Useradd, metadata do # Inconsistent behavior. See: CHEF-2205 it "created the home dir b/c of CHEF-2205 so it still exists" do # This behavior seems contrary to expectation and non-convergent. - expect(File).not_to exist("/home/foo") - expect(File).to exist("/home/bar") + expect(File).not_to exist("/home/cheftestfoo") + expect(File).to exist("/home/cheftestbar") end elsif ohai[:platform] == "aix" it "creates the home dir in the desired location" do - expect(File).not_to exist("/home/foo") - expect(File).to exist("/home/bar") + expect(File).not_to exist("/home/cheftestfoo") + expect(File).to exist("/home/cheftestbar") end else it "does not create the home dir in the desired location (XXX)" do # This behavior seems contrary to expectation and non-convergent. - expect(File).not_to exist("/home/foo") - expect(File).not_to exist("/home/bar") + expect(File).not_to exist("/home/cheftestfoo") + expect(File).not_to exist("/home/cheftestbar") end end end @@ -446,8 +446,8 @@ describe Chef::Provider::User::Useradd, metadata do it "leaves the old home directory around (XXX)" do # Would it be better to remove the old home? - expect(File).to exist("/home/foo") - expect(File).not_to exist("/home/bar") + expect(File).to exist("/home/cheftestfoo") + expect(File).not_to exist("/home/cheftestbar") end end end |