Sha256: fa6b231d7e048d6e3a9890ff27a04ac56b1111cd2cc52917deeb1da361241f1a

Contents?: true

Size: 1.13 KB

Versions: 20

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

RSpec.configure do |c|
  c.os = 'Debian'
end

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

20 entries across 20 versions & 1 rubygems

Version Path
serverspec-0.11.1 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.11.0 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.13 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.12 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.11 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.10 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.9 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.8 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.7 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.6 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.5 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.4 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.3 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.2 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.1 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.10.0 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.9.8 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.9.7 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.9.6 spec/debian/linux_kernel_parameter_spec.rb
serverspec-0.9.5 spec/debian/linux_kernel_parameter_spec.rb