Sha256: 77f0624c5c058c7ebf09f62e1631a911c33b0e5bf902d8b013e7edc12dfbb821

Contents?: true

Size: 951 Bytes

Versions: 10

Compression:

Stored size: 951 Bytes

Contents

require 'spec_helper'

property[:os] = nil
set :os, :family => 'linux'

describe get_command(:check_selinux_has_mode, 'disabled') do
  it do
    should eq %Q{test ! -f /etc/selinux/config || ( (} +
              %Q{getenforce | grep -i -- disabled) ||} +
              %Q{ (getenforce | grep -i -- permissive) )} +
              %Q{ && grep -iE -- '^\\s*SELINUX=disabled\\>' /etc/selinux/config}
  end
end

describe get_command(:check_selinux_has_mode, 'permissive', nil) do
  it do
    should eq %Q{(getenforce | grep -i -- permissive)} +
              %Q{ && grep -iE -- '^\\s*SELINUX=permissive\\>' /etc/selinux/config}
  end
end

describe get_command(:check_selinux_has_mode, 'enforcing', 'targeted') do
  it do
    should eq %Q{(getenforce | grep -i -- enforcing)} +
              %Q{ && grep -iE -- '^\\s*SELINUX=enforcing\\>' /etc/selinux/config} +
              %Q{ && grep -iE -- '^\\s*SELINUXTYPE=targeted\\>' /etc/selinux/config}
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
specinfra-2.67.2 spec/command/linux/selinux_spec.rb
specinfra-2.67.1 spec/command/linux/selinux_spec.rb
specinfra-2.67.0 spec/command/linux/selinux_spec.rb
specinfra-2.66.9 spec/command/linux/selinux_spec.rb
specinfra-2.66.8 spec/command/linux/selinux_spec.rb
specinfra-2.66.7 spec/command/linux/selinux_spec.rb
specinfra-2.66.6 spec/command/linux/selinux_spec.rb
specinfra-2.66.5 spec/command/linux/selinux_spec.rb
specinfra-2.66.4 spec/command/linux/selinux_spec.rb
specinfra-2.66.3 spec/command/linux/selinux_spec.rb