Sha256: bee23d07d3a0e6a43c5d6e788941def17eb51a6e6377a6948b33662ee7af9b9b

Contents?: true

Size: 1.42 KB

Versions: 71

Compression:

Stored size: 1.42 KB

Contents

require 'spec_helper'

set :os, :family => 'base'

describe routing_table do
  let(:stdout) { "192.168.100.0/24 dev eth1  proto kernel  scope link  src 192.168.100.10 \r\n" }
  it { should have_entry( :destination => '192.168.100.0/24' ) }
end

describe routing_table do
  let(:exit_status) { 1 }
  it { should_not have_entry( :destination => '192.168.100.100/24' ) }
end

describe routing_table do
  let(:stdout) { "192.168.100.0/24 dev eth1  proto kernel  scope link  src 192.168.100.10 \r\n" }
  it do
    should have_entry(
      :destination => '192.168.100.0/24',
      :interface   => 'eth1'
    )
  end
end

describe routing_table do
  let(:stdout) { "192.168.200.0/24 via 192.168.200.1 dev eth0 \r\n" }
  it { should have_entry( :destination => '192.168.200.0/24' ) }

  it do
    should have_entry(
      :destination => '192.168.200.0/24',
      :gateway     => '192.168.200.1'
    )
  end

  it do
    should have_entry(
      :destination => '192.168.200.0/24',
      :gateway     => '192.168.200.1',
      :interface   => 'eth0'
    )
  end
end

describe routing_table do
  let(:stdout) { "default via 10.0.2.2 dev eth0 \r\n" }
  it { should     have_entry( :destination => 'default' ) }

  it do
    should have_entry(
      :destination => 'default',
      :gateway     => '10.0.2.2'
    )
  end

  it do
    should have_entry(
      :destination => 'default',
      :gateway     => '10.0.2.2',
      :interface   => 'eth0'
    )
  end
end

Version data entries

71 entries across 71 versions & 3 rubygems

Version Path
serverspec-2.38.0 spec/type/base/routing_table_spec.rb
serverspec-2.37.2 spec/type/base/routing_table_spec.rb
serverspec-2.37.1 spec/type/base/routing_table_spec.rb
serverspec-2.37.0 spec/type/base/routing_table_spec.rb
serverspec-2.36.1 spec/type/base/routing_table_spec.rb
serverspec-2.36.0 spec/type/base/routing_table_spec.rb
serverspec-2.35.0 spec/type/base/routing_table_spec.rb
serverspec-2.34.0 spec/type/base/routing_table_spec.rb
serverspec-2.33.0 spec/type/base/routing_table_spec.rb
serverspec-2.32.0 spec/type/base/routing_table_spec.rb
serverspec-2.31.1 spec/type/base/routing_table_spec.rb
serverspec-2.31.0 spec/type/base/routing_table_spec.rb
serverspec-2.30.1 spec/type/base/routing_table_spec.rb
serverspec-2.30.0 spec/type/base/routing_table_spec.rb
serverspec-2.29.2 spec/type/base/routing_table_spec.rb
serverspec-2.29.1 spec/type/base/routing_table_spec.rb
serverspec-2.29.0 spec/type/base/routing_table_spec.rb
serverspec-2.28.0 spec/type/base/routing_table_spec.rb
serverspec-2.27.0 spec/type/base/routing_table_spec.rb
serverspec-2.26.0 spec/type/base/routing_table_spec.rb