Sha256: 95a95694164a4e3d32949783f776683227990c9cdfe404c1ec8621038a72d16f

Contents?: true

Size: 1.12 KB

Versions: 42

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'

include SpecInfra::Helper::Debian

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

42 entries across 42 versions & 1 rubygems

Version Path
serverspec-1.0.0 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.16.0 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.15.5 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.15.4 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.15.3 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.15.2 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.15.1 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.15.0 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.14.4 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.14.3 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.14.2 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.14.1 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.14.0 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.7 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.6 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.5 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.4 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.3 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.2 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.13.1 spec/debian/linux_kernel_parameter_spec.rb