summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-17 14:40:01 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-17 14:40:01 -0800
commit4ba40b6da83cb696cd43cf15a0de65e17e0d5983 (patch)
tree0315356eccfcdee5548375ada1354d7b598e669b
parent83bab84325ce969d03d6f6373497fa8b21e80b53 (diff)
downloadchef-aix_uid.tar.gz
skip uid check for aix in user add functional testsaix_uid
-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..b77d8d592e 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: (ohai[:platform] == "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