Sha256: c2442489e760a03f4cfea9dc5a09270024ae3de8b40194242cb485af77ad91a4

Contents?: true

Size: 888 Bytes

Versions: 78

Compression:

Stored size: 888 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{ && 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

78 entries across 78 versions & 2 rubygems

Version Path
specinfra-2.53.1 spec/command/linux/selinux_spec.rb
specinfra-2.53.0 spec/command/linux/selinux_spec.rb
specinfra-2.52.0 spec/command/linux/selinux_spec.rb
specinfra-2.51.2 spec/command/linux/selinux_spec.rb
specinfra-2.51.1 spec/command/linux/selinux_spec.rb
specinfra-2.51.0 spec/command/linux/selinux_spec.rb
specinfra-2.50.4 spec/command/linux/selinux_spec.rb
specinfra-2.50.3 spec/command/linux/selinux_spec.rb
specinfra-2.50.2 spec/command/linux/selinux_spec.rb
specinfra-2.50.1 spec/command/linux/selinux_spec.rb
specinfra-2.50.0 spec/command/linux/selinux_spec.rb
specinfra-2.49.0 spec/command/linux/selinux_spec.rb
specinfra-2.48.0 spec/command/linux/selinux_spec.rb
specinfra-2.47.1 spec/command/linux/selinux_spec.rb
specinfra-2.47.0 spec/command/linux/selinux_spec.rb
specinfra-2.46.0 spec/command/linux/selinux_spec.rb
specinfra-2.45.0 spec/command/linux/selinux_spec.rb
specinfra-2.44.8 spec/command/linux/selinux_spec.rb
specinfra-2.44.7 spec/command/linux/selinux_spec.rb
specinfra-2.44.6 spec/command/linux/selinux_spec.rb