summaryrefslogtreecommitdiff
path: root/spec/unit/provider/user/dscl_spec.rb
diff options
context:
space:
mode:
authorPat Cox <pcox@fb.com>2015-01-05 15:48:22 -0800
committerPat Cox <pcox@fb.com>2015-01-12 14:26:57 -0800
commitbcba63cca1ebf057fbd97a04ec4b368ebe9028a6 (patch)
tree4c95f6c3fa99d58bde528dbcf6d86e4c8f11f84c /spec/unit/provider/user/dscl_spec.rb
parent4dda161d7afa3887f4910b948f677a074ab58a56 (diff)
downloadchef-bcba63cca1ebf057fbd97a04ec4b368ebe9028a6.tar.gz
bugfix dscl provider
We need to compare with the UID, not a GUID. So we need to map the correct field for comparison. Also fix a bug in determining used uids. This fixes this exception when the specified uid is actually in use by the correct user: Chef::Exceptions::RequestedUIDUnavailable: uid 48 is already in use
Diffstat (limited to 'spec/unit/provider/user/dscl_spec.rb')
-rw-r--r--spec/unit/provider/user/dscl_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/user/dscl_spec.rb b/spec/unit/provider/user/dscl_spec.rb
index 24691cce33..cc0cea5c92 100644
--- a/spec/unit/provider/user/dscl_spec.rb
+++ b/spec/unit/provider/user/dscl_spec.rb
@@ -422,7 +422,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30"
it "collects the user data correctly" do
provider.load_current_resource
expect(provider.current_resource.comment).to eq("vagrant")
- expect(provider.current_resource.uid).to eq("11112222-3333-4444-AAAA-BBBBCCCCDDDD")
+ expect(provider.current_resource.uid).to eq("501")
expect(provider.current_resource.gid).to eq("80")
expect(provider.current_resource.home).to eq("/Users/vagrant")
expect(provider.current_resource.shell).to eq("/bin/bash")
@@ -487,7 +487,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30"
it "collects the user data correctly" do
provider.load_current_resource
expect(provider.current_resource.comment).to eq("vagrant")
- expect(provider.current_resource.uid).to eq("11112222-3333-4444-AAAA-BBBBCCCCDDDD")
+ expect(provider.current_resource.uid).to eq("501")
expect(provider.current_resource.gid).to eq("80")
expect(provider.current_resource.home).to eq("/Users/vagrant")
expect(provider.current_resource.shell).to eq("/bin/bash")
@@ -513,7 +513,7 @@ e68d1f9821b26689312366")
it "collects the user data correctly" do
provider.load_current_resource
expect(provider.current_resource.comment).to eq("vagrant")
- expect(provider.current_resource.uid).to eq("11112222-3333-4444-AAAA-BBBBCCCCDDDD")
+ expect(provider.current_resource.uid).to eq("501")
expect(provider.current_resource.gid).to eq("80")
expect(provider.current_resource.home).to eq("/Users/vagrant")
expect(provider.current_resource.shell).to eq("/bin/bash")
@@ -551,7 +551,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30")
it "collects the user data correctly" do
provider.load_current_resource
expect(provider.current_resource.comment).to eq("vagrant")
- expect(provider.current_resource.uid).to eq("11112222-3333-4444-AAAA-BBBBCCCCDDDD")
+ expect(provider.current_resource.uid).to eq("501")
expect(provider.current_resource.gid).to eq("80")
expect(provider.current_resource.home).to eq("/Users/vagrant")
expect(provider.current_resource.shell).to eq("/bin/bash")