summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-18 08:17:12 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-18 08:17:12 -0800
commitcab6243b977c501366721965c6ccd039f33646cf (patch)
tree0e8ab7ff8e3cf01b38dba214dd55befc85901da4
parent8ba457d33c1f16d0ca8dcecb88fb13a3a7ade5d2 (diff)
parentd635666e81bcab5e611dec1990e1b2cea4caf557 (diff)
downloadchef-cab6243b977c501366721965c6ccd039f33646cf.tar.gz
Merge pull request #4592 from chef/aix_uid
skip uid check for aix in user add functional tests
-rw-r--r--spec/functional/resource/user/useradd_spec.rb25
1 files changed, 9 insertions, 16 deletions
diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb
index 1a34e89e4a..6ac855fbfc 100644
--- a/spec/functional/resource/user/useradd_spec.rb
+++ b/spec/functional/resource/user/useradd_spec.rb
@@ -281,24 +281,17 @@ describe Chef::Provider::User::Useradd, metadata do
end
end
- context "when a system user is specified" do
+ context "when a system user is specified", skip: aix? do
let(:system) { true }
let(:uid_min) do
- case ohai[:platform]
- when "aix"
- # UIDs and GIDs below 200 are typically reserved for system accounts and services
- # https://abcofaix.wordpress.com/tag/usermod/
- 200
- else
- # from `man useradd`, login user means uid will be between
- # UID_SYS_MIN and UID_SYS_MAX defined in /etc/login.defs. On my
- # Ubuntu 13.04 system, these are commented out, so we'll look at
- # UID_MIN to find the lower limit of the non-system-user range, and
- # use that value in our assertions.
- login_defs = File.open("/etc/login.defs", "rb") { |f| f.read }
- uid_min_scan = /^UID_MIN\s+(\d+)/
- login_defs.match(uid_min_scan)[1]
- end
+ # from `man useradd`, login user means uid will be between
+ # UID_SYS_MIN and UID_SYS_MAX defined in /etc/login.defs. On my
+ # Ubuntu 13.04 system, these are commented out, so we'll look at
+ # UID_MIN to find the lower limit of the non-system-user range, and
+ # use that value in our assertions.
+ login_defs = File.open("/etc/login.defs", "rb") { |f| f.read }
+ uid_min_scan = /^UID_MIN\s+(\d+)/
+ login_defs.match(uid_min_scan)[1]
end
it "ensures the user has the properties of a system user" do