Sha256: 4bdcb5380a9edc2ff94d20b7c2d6814043a6b94514c51ea4a8a8dc82ef2ce263

Contents?: true

Size: 954 Bytes

Versions: 94

Compression:

Stored size: 954 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

94 entries across 94 versions & 1 rubygems

Version Path
specinfra-2.91.0 spec/command/linux/selinux_spec.rb
specinfra-2.90.1 spec/command/linux/selinux_spec.rb
specinfra-2.90.0 spec/command/linux/selinux_spec.rb
specinfra-2.89.0 spec/command/linux/selinux_spec.rb
specinfra-2.88.2 spec/command/linux/selinux_spec.rb
specinfra-2.88.1 spec/command/linux/selinux_spec.rb
specinfra-2.88.0 spec/command/linux/selinux_spec.rb
specinfra-2.87.2 spec/command/linux/selinux_spec.rb
specinfra-2.87.1 spec/command/linux/selinux_spec.rb
specinfra-2.87.0 spec/command/linux/selinux_spec.rb
specinfra-2.86.0 spec/command/linux/selinux_spec.rb
specinfra-2.85.1 spec/command/linux/selinux_spec.rb
specinfra-2.85.0 spec/command/linux/selinux_spec.rb
specinfra-2.84.1 spec/command/linux/selinux_spec.rb
specinfra-2.84.0 spec/command/linux/selinux_spec.rb
specinfra-2.83.4 spec/command/linux/selinux_spec.rb
specinfra-2.83.3 spec/command/linux/selinux_spec.rb
specinfra-2.83.2 spec/command/linux/selinux_spec.rb
specinfra-2.83.1 spec/command/linux/selinux_spec.rb
specinfra-2.83.0 spec/command/linux/selinux_spec.rb