spec/aix/user_spec.rb in serverspec-0.9.3 vs spec/aix/user_spec.rb in serverspec-0.9.4

- old
+ new

@@ -1,10 +1,9 @@ require 'spec_helper' -include Serverspec::Helper::RedHat +include Serverspec::Helper::AIX - describe user('root') do it { should exist } its(:command) { should eq "id root" } end @@ -12,11 +11,11 @@ it { should_not exist } end describe user('root') do it { should belong_to_group 'root' } - its(:command) { should eq "id root | awk '{print $3}' | grep -- root" } + its(:command) { should eq "lsuser -a groups root | awk -F'=' '{print $2}'| sed -e 's/,/ /g' |grep -w -- root" } end describe user('root') do it { should_not belong_to_group 'invalid-group' } end @@ -30,19 +29,19 @@ it { should_not have_uid 'invalid-uid' } end describe user('root') do it { should have_login_shell '/bin/bash' } - its(:command) { should eq "getent passwd root | cut -f 7 -d ':' | grep -w -- /bin/bash" } + its(:command) { should eq "lsuser -a shell root |awk -F'=' '{print $2}' | grep -w -- /bin/bash" } end describe user('root') do it { should_not have_login_shell 'invalid-login-shell' } end describe user('root') do it { should have_home_directory '/root' } - its(:command) { should eq "getent passwd root | cut -f 6 -d ':' | grep -w -- /root" } + its(:command) { should eq "lsuser -a home root | awk -F'=' '{print $2}' | grep -w -- /root" } end describe user('root') do it { should_not have_home_directory 'invalid-home-directory' } end