Sha256: 359e16a9f5d35c1111739fcafd35f4e54f9209ef648e9f05473582bdcb8740d7

Contents?: true

Size: 1.12 KB

Versions: 39

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'

include Serverspec::Helper::Gentoo

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

39 entries across 39 versions & 1 rubygems

Version Path
serverspec-0.11.5 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.11.4 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.11.3 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.11.2 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.9.4 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.9.3 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.9.2 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.9.1 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.9.0 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.8.1 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.8.0 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.13 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.12 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.11 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.10 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.9 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.8 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.7 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.6 spec/gentoo/linux_kernel_parameter_spec.rb
serverspec-0.7.5 spec/gentoo/linux_kernel_parameter_spec.rb