Sha256: dbf5c881e62e380640cd1d7a01c3ec5a36bf975341b1b6c0ccdd981e69c65ef7

Contents?: true

Size: 1.12 KB

Versions: 14

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'

include SpecInfra::Helper::Fedora

describe linux_kernel_parameter('net.ipv4.tcp_syncookies') do
  let(:stdout) { "1\n" }
  its(:value) { should eq 1 }
  its(:command) { should eq "/sbin/sysctl -q -n net.ipv4.tcp_syncookies" }
end

describe linux_kernel_parameter('net.ipv4.tcp_syncookies') do
  let(:stdout) { "1\n" }
  its(:value) { should_not eq 2 }
end

describe linux_kernel_parameter('kernel.osrelease') do
  let(:stdout) { "2.6.32-131.0.15.el6.x86_64\n" }
  its(:value) { should eq "2.6.32-131.0.15.el6.x86_64" }
  its(:command) { should eq "/sbin/sysctl -q -n kernel.osrelease" }
end

describe linux_kernel_parameter('kernel.osrelease') do
  let(:stdout) { "2.6.32-131.0.15.el6.x86_64\n" }
  its(:value) { should_not eq "2.6.32-131.0.15.el6.i386" }
end

describe linux_kernel_parameter('net.ipv4.tcp_wmem') do
  let(:stdout) { "4096	16384	4194304\n" }
  its(:value) { should match /16384/ }
  its(:command) { should eq "/sbin/sysctl -q -n net.ipv4.tcp_wmem" }
end

describe linux_kernel_parameter('net.ipv4.tcp_wmem') do
  let(:stdout) { "4096	16384	4194304\n" }
  its(:value) { should_not match /123456/ }
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
serverspec-1.16.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.15.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.14.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.13.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.12.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.11.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.10.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.9.1 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.9.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.8.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.7.1 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.7.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.6.0 spec/fedora/linux_kernel_parameter_spec.rb
serverspec-1.5.0 spec/fedora/linux_kernel_parameter_spec.rb