diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-11-15 11:24:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 11:24:25 -0800 |
commit | f8ac5e6acae227f414a8f118a86915ab23127bdc (patch) | |
tree | b48c90424be4bbbcfc56c6dc3ddcb7b0e51a5223 | |
parent | 4648c88b263282cb49564d106340fc737f60b0bc (diff) | |
parent | 0c64f14ed251ad25892a37a7732056bf0e4575ae (diff) | |
download | chef-f8ac5e6acae227f414a8f118a86915ab23127bdc.tar.gz |
Merge pull request #6586 from chef/jsnapp/chef-12/fix_useradd_spec_test
Use Chef::VersionConstraint in useradd_spec test
-rw-r--r-- | spec/functional/resource/user/useradd_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb index 86a5d943de..175809b5c0 100644 --- a/spec/functional/resource/user/useradd_spec.rb +++ b/spec/functional/resource/user/useradd_spec.rb @@ -646,7 +646,7 @@ describe Chef::Provider::User::Useradd, metadata do expect(@error.message).to include("Cannot unlock the password") end elsif %w{rhel}.include?(OHAI_SYSTEM["platform_family"]) && - (OHAI_SYSTEM["platform_version"].to_f >= 6.8 || OHAI_SYSTEM["platform_version"].to_f >= 7.3) + (Chef::VersionConstraint.new("~> 6.8").include?(OHAI_SYSTEM["platform_version"].to_f) || Chef::VersionConstraint.new("~> 7.3").include?(OHAI_SYSTEM["platform_version"].to_f)) # RHEL 6.8 and 7.3 ship with a fixed `usermod` command # Reference: https://access.redhat.com/errata/RHBA-2016:0864 # Reference: https://access.redhat.com/errata/RHBA-2016:2322 |