Sha256: 9f7e31265c0c68437f3c1fd26948f3e5f65755b862a9aebbbbd4c4325e8a64b6
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
require 'spec_helper' include Serverspec::Helper::RedHat describe 'Serverspec commands of Red Hat' do it_behaves_like 'support command check_user', 'root' it_behaves_like 'support command check_user', 'wheel' it_behaves_like 'support command check_running_under_supervisor', 'httpd' it_behaves_like 'support command check_running_under_upstart', 'monit' it_behaves_like 'support command check_monitored_by_monit', 'unicorn' it_behaves_like 'support command check_process', 'httpd' it_behaves_like 'support command check_belonging_group', 'root', 'wheel' it_behaves_like 'support command check_uid', 'root', 0 it_behaves_like 'support command check_login_shell', 'root', '/bin/bash' it_behaves_like 'support command check_home_directory', 'root', '/root' it_behaves_like 'support command check_authorized_key' end describe 'check_enabled' do subject { commands.check_enabled('httpd') } it { should eq 'chkconfig --list httpd | grep 3:on' } end describe 'check_enabled with level 4' do subject { commands.check_enabled('httpd', 4) } it { should eq 'chkconfig --list httpd | grep 4:on' } end describe 'check_yumrepo' do subject { commands.check_yumrepo('epel') } it { should eq 'yum repolist all -C | grep ^epel' } end describe 'check_yumrepo_enabled' do subject { commands.check_yumrepo_enabled('epel') } it { should eq 'yum repolist all -C | grep ^epel | grep enabled' } end describe 'check_running' do subject { commands.check_running('httpd') } it { should eq 'service httpd status' } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
serverspec-0.6.23 | spec/redhat/commands_spec.rb |